Skip to content

Instantly share code, notes, and snippets.

@mqasimsarfraz
Created January 8, 2019 19:05
Show Gist options
  • Save mqasimsarfraz/30c8a1d48235d23b4f0a530444ed9ecd to your computer and use it in GitHub Desktop.
Save mqasimsarfraz/30c8a1d48235d23b4f0a530444ed9ecd to your computer and use it in GitHub Desktop.
A simple if/else based dockerfile.
FROM centos:7
ARG arg1
ARG arg2
ARG arg3
RUN if [ "x$arg1" = "x" ] ; then echo arg1 not provided ; fi && \
if [ "x$arg2" = "x" ] ; then echo arg2 not provided ; fi && \
if [ "x$arg3" = "x" ] ; then echo arg3 not provided ; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment