0.0
No commit activity in last 3 years
No release in over 3 years
Dockerfile DSL and generator
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

 Project Readme

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