I have the below Dockerfile.
FROM ubuntu:14.04 MAINTAINER Samuel Alexander RUN
To complete Dmitry's answer, you can use uniq arg like date +%s to keep always same commanline
date +%s
docker build --build-arg DUMMY=`date +%s` -t me/myapp:1.0.0
Dockerfile:
Dockerfile
... ARG DUMMY=unknown RUN DUMMY=${DUMMY} git clone xxx ...