Pass git commit to docker image ARG GIT_COMMIT ENV GIT_COMMIT ${GIT_COMMIT} # pass git commit hash to container docker build --build-arg GIT_COMMIT=$(git rev-parse --short HEAD) -t integration-api . console.log(process.env.GIT_COMMIT) => '587503f'