Example of using LABEL and ARG in a Dockerfile Dockerfile FROM ubuntu:14.04 RUN apt-get -y update RUN apt-get -y install vim RUN apt-get -y install curl ARG GIT_COMMIT=unknown LABEL git-commit=$GIT_COMMIT Building the image docker build -t test --build-arg GIT_COMMIT=0123456789 .