https://github.com/gmemstr/whalepod
Mass Dockerfile generator written in Rust (experimental)
https://github.com/gmemstr/whalepod
Last synced: 5 months ago
JSON representation
Mass Dockerfile generator written in Rust (experimental)
- Host: GitHub
- URL: https://github.com/gmemstr/whalepod
- Owner: gmemstr
- Created: 2020-05-09T15:49:30.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-05-11T15:41:28.000Z (over 5 years ago)
- Last Synced: 2025-01-26T13:41:29.419Z (12 months ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Whalepod
===
**Quickly generate Dockerfiles**
Maintaining multiple Docker images for various version of an application - for example, Node.js -
can become tricky past a certain point. Whalepod aims to make it easier to generate and maintain
Dockerfiles using templates and YAML, and creating the neccesary tooling configuration to build
and push them.
[](https://asciinema.org/a/328945)
Proof of concept using Whalepod: https://github.com/gmemstr/flutter-fastlane-android
whalepod.yml
---
The `whalepod.yml` file contains the information neccesary to generate the Docker images. It
requires a few things; first a name for the Docker image, followed by a list of versions, optional
parameters, and a template Dockerfile that will be processed.
### Example whalepod.yml
```yaml
name: whalepod-example
versions:
- 1.0
- 1.1
- 1.2
- 2.0
- 3.0
parameters:
hello_to: "Docker"
template: |
FROM alpine:3.7
LABEL version="<>"
RUN echo Hello <>!
```
Running
---
Running `whalepod` is as simple as executing the command with a valid `whalepod.yml` file. If your
`whalepod.yml` file is located elsewhere or is named something other than `whalepod.yml`, you can
specify another file with `whalepod `.
Each Dockerfile will live in it's own directory based on the version, and a Makefile will be
generated alongside it with pre-filled commands to build the images. An alternative output folder
can be specified by passing through the `--output ` (`-o=`) flag.
> TODO: add `docker push` command to Makefile
```
whalepod 0.1.0
Quickly generate Dockerfiles from YAML
USAGE:
whalepod [OPTIONS] [path]
FLAGS:
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-o, --output [default: .]
ARGS:
The path to configuration file [default: whalepod.yml]
```
Disclaimer
---
This is very much an experiment, and my first foray into Rust. Feedback and contributions are
welcome - I intend to maintain it moving forward, and I do not intend to introduce breaking
changes, however keep that in mind!