Gist for the code to Referencing environment variable in KubernetesPodOperator cmds
The images both exist as
mwmahlberg/stackoverflow-77971921:entrypoint
andmwmahlberg/stackoverflow-77971921:non-interactive
in the according repo on dockerhub
docker build -t $YOURORG/$IMAGENAME:entrypoint -f Dockerfile.entrypoint
docker build -t $YOURORG/$IMAGENAME:non-interactive -f Dockerfile.non-interactive
git
- make (Duh!)
docker
- A Dockerhub account should you want to push
Variable | description | default |
---|---|---|
DOCKERORG |
The organization on dockerhub under which the image resides | mwmahlberg |
DOCKERREPO |
The repository for the image under $DOCKERORG |
stackoverflow-77971921 |
You can set the variable per call via:
DOCKERORG="gcr.io/foobar" make
The Makefile has the following targets:
Target | description |
---|---|
all |
builds both entrypoint and non-interactive |
entrypoint |
builds just the entrypoint variant |
non-interactive |
builds just the non-interactive variant |
push |
pushes all images of $DOCKERORG/$DOCKERREPO |
clean |
removes the temporary files |
image-clean |
removes the images. |
all-clean |
an alias for clean image-clean |
docker run --rm $YOURORG/$IMAGENAME:entrypoint
docker run --rm $YOURORG/$IMAGENAME:non-interactive
Hello World