https://github.com/garethr/dockerfilepp
Library for writing your own Dockerfile pre-processors
https://github.com/garethr/dockerfilepp
Last synced: about 1 month ago
JSON representation
Library for writing your own Dockerfile pre-processors
- Host: GitHub
- URL: https://github.com/garethr/dockerfilepp
- Owner: garethr
- License: apache-2.0
- Created: 2016-07-17T16:21:51.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-06T08:28:57.000Z (almost 9 years ago)
- Last Synced: 2025-05-08T01:13:28.280Z (about 1 month ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
A simple library for building Dockerfile pre-processors.
[](https://travis-ci.org/garethr/dockerfilepp)
[](https://goreportcard.com/report/github.com/garethr/dockerfilepp)
[](https://godoc.org/github.com/garethr/dockerfilepp)Dockerfile pre-processors aim to make extending Dockerfile with new
domain-specific instructions easy. Simply build your own pre-processor
and pipe Dockerfiles in on stdin.Here is a simple hello world usage of the API:
```go
package mainimport (
"github.com/garethr/dockerfilepp"
)func main() {
replacements := map[string]string{
"CUSTOM_INSTALL": "RUN apt-get install thing",
"CUSTOM_ECHO": "RUN echo hello",
}
dockerfilepp.Process(replacements, "include comprehensive help text here")
}
```As a example implementation see [dockerfilepp-puppet](https://github.com/garethr/dockerfilepp-puppet)
which uses local files compiled into the binary rather than hard coded
variables.