Last active
August 29, 2015 14:16
-
-
Save tianon/34450ecf1c623725daec to your computer and use it in GitHub Desktop.
generated, parameterized Dockerfiles
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
cat <<-'EOF' | |
# WARNING: This file is generated. DO NOT MODIFY DIRECTLY. | |
FROM ubuntu:12.04 | |
RUN ... | |
EOF | |
if [ "$SOME_KNOB" ]; then | |
cat <<-'EOF' | |
RUN ... | |
RUN ... | |
EOF | |
else | |
cat <<-'EOF' | |
RUN ... | |
RUN ... | |
ENV ... | |
EOF | |
fi | |
cat <<-'EOF' | |
RUN ... | |
ENV ... | |
RUN ... | |
CMD [...] | |
EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
build: | |
./hack/generate-dockerfile.sh > Dockerfile | |
docker build -t docker . | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment