Skip to content

Instantly share code, notes, and snippets.

@kamilziajka
Created August 3, 2017 12:36
Show Gist options
  • Save kamilziajka/ed4a8d1c72675146189acff47670344b to your computer and use it in GitHub Desktop.
Save kamilziajka/ed4a8d1c72675146189acff47670344b to your computer and use it in GitHub Desktop.
Docker build arguments
docker build --tag ansible .
docker build --tag ansible --build-arg ANSIBLE_VERSION=2.2.0.0 .
FROM ubuntu
ARG ANSIBLE_VERSION
RUN \
apt \
update \
--yes \
&& \
apt \
install \
--yes \
python \
python-pip
RUN \
pip \
install \
ansible$([ -n "$ANSIBLE_VERSION" ] && echo "==$ANSIBLE_VERSION")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment