February 28, 2018
You can stop the build at a certain stage and tag them as you want.
docker build --target test -t starx/test:latest . docker build --target staging -t starx/staging:latest . docker build --target prod -t starx/prod:latest .
This way, you have different images and you can push each image individually.