https://github.com/raviqqe/dockerfile-dsl.rb
Dockerfile DSL in Ruby
https://github.com/raviqqe/dockerfile-dsl.rb
docker dsl ruby
Last synced: about 1 year ago
JSON representation
Dockerfile DSL in Ruby
- Host: GitHub
- URL: https://github.com/raviqqe/dockerfile-dsl.rb
- Owner: raviqqe
- License: unlicense
- Created: 2016-10-23T04:23:56.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-23T19:52:18.000Z (over 9 years ago)
- Last Synced: 2024-05-02T01:07:26.236Z (about 2 years ago)
- Topics: docker, dsl, ruby
- Language: Ruby
- Size: 30.3 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dockerfile-dsl
[](https://travis-ci.org/raviqqe/dockerfile-dsl.rb)
[](https://unlicense.org)
Dockerfile DSL in Ruby
## Installation
```
$ gem install dockerfile-dsl
```
## Usage
Code:
```ruby
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:
```dockerfile
FROM ubuntu
RUN sudo apt install nginx
ADD nginx.conf /etc/nginx.conf
CMD ["service", "nginx", "start"]
```
For more examples, see [examples](examples) directory.
## License
[The Unlicense](https://unlicense.org)