dockerfile-dsl

Dockerfile DSL and generator


Keywords
docker, dsl, ruby
License
Unlicense
Install
gem install dockerfile-dsl -v 0.0.2

Documentation

dockerfile-dsl

Build Status License

Dockerfile DSL in Ruby

Installation

$ gem install dockerfile-dsl

Usage

Code:

require 'dockerfile-dsl'

file = dockerfile do
  from :ubuntu
  run 'sudo apt install nginx'
  add 'nginx.conf', '/etc/nginx.conf'
  cmd [:service, :nginx, :start]
end

puts file

Output:

FROM ubuntu
RUN sudo apt install nginx
ADD nginx.conf /etc/nginx.conf
CMD ["service", "nginx", "start"]

For more examples, see examples directory.

License

The Unlicense