Supposed I have an image that I want to tag as 0.10.24 (in my case it\'s an image containing Node.js 0.10.24). I built that image using a Dockerfile and executi
Just grep the ID from docker images:
docker build -t creack/node:latest .
ID="$(docker images | grep 'creak/node' | head -n 1 | awk '{print $3}')"
docker tag "$ID" creack/node:0.10.24
docker tag "$ID" creack/node:latest
Needs no temporary file and gives full build output. You still can redirect it to /dev/null or a log file.