Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/garethr/dockerfilepp
Library for writing your own Dockerfile pre-processors
https://github.com/garethr/dockerfilepp
Last synced: 2 months 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 (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-06T08:28:57.000Z (over 8 years ago)
- Last Synced: 2024-10-04T18:22:53.674Z (3 months ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 8
- Watchers: 4
- 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.
[![Build
Status](https://travis-ci.org/garethr/dockerfilepp.svg)](https://travis-ci.org/garethr/dockerfilepp)
[![Go Report
Card](https://goreportcard.com/badge/github.com/garethr/dockerfilepp)](https://goreportcard.com/report/github.com/garethr/dockerfilepp)
[![GoDoc](https://godoc.org/github.com/garethr/dockerfilepp?status.svg)](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.