# Build the image
docker build -t myapp:1.2.0 .
# Tag for the registry
docker tag myapp:1.2.0 registry.example.com/myapp:1.2.0
# Push
docker push registry.example.com/myapp:1.2.0
# On the server
docker pull registry.example.com/myapp:1.2.0
docker run registry.example.com/myapp:1.2.0
latest is dangerous in production: each pull may fetch a different image. Always pin to a specific tag or SHA digest.