dockerfile-dsl.rb

Dockerfile DSL in Ruby

UNLICENSE License

Downloads
4.8K
Stars
5
Committers
1

dockerfile-dsl

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

Package Rankings
Top 34.55% on Rubygems.org
Badges
Extracted from project README
Build Status License
Related Projects