Dockerfile
contains various stages which are tagged by a name using as
.
docker build . -t multi-stage-example:v1
- Build imagedocker build . -t multi-stage-example:v1 --target=builder
- Build image using a specific stagedocker run multi-stage-example:v1 -p 8080:8080
- Run image