Ship and operate

Tag, push, and deploy the image

Publish an immutable application version to a registry and identify what a production container platform must configure around it.

8 minute lesson

~~~

A deployment starts with an image that another Docker engine or container platform can pull. Give releases explicit version tags rather than relying only on latest.

Authenticate to your registry, tag the tested image with the registry repository, and push it. Production still needs secrets, ports, persistent storage, health checks, resource limits, logs, backups, and a rollback plan. The image alone is not the whole system.

docker tag notes-api:prod YOUR_NAME/notes-api:1.0.0
docker login
docker push YOUR_NAME/notes-api:1.0.0

Record the digest produced by the push and deploy that immutable reference when the platform supports it. Also confirm the image platform matches production. A successful pull proves distribution worked; it does not prove the configured service can reach its database, write its volume, or pass its health check.

Make the release record include the image digest, configuration version, migration state, and smoke-test result. Keep the previous digest available for rollback. Rolling the image back does not roll back a database schema or external side effect, so migrations should remain compatible across the rollback window. After deployment, request a real application path and verify logs and health from the production environment before declaring the release complete.

Use a registry repository you control, push one versioned tag, and pull it into a clean local environment or another machine.

Lesson completed

Take this course offline

Get every free book and course as PDF and EPUB files.

Get the download library →