Created
August 3, 2017 12:36
-
-
Save kamilziajka/ed4a8d1c72675146189acff47670344b to your computer and use it in GitHub Desktop.
Docker build arguments
This file contains 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
docker build --tag ansible . | |
docker build --tag ansible --build-arg ANSIBLE_VERSION=2.2.0.0 . |
This file contains 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
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