Create and publish docker image

Push simple Node application to Docker hub

Build image

Dockerfile example https://github.com/alytvynov/docker-simple-node/blob/master/Dockerfile

To build image run the command

Now if you run the command bellow you ll see your image

Docker hubs

What is docker image registry ? This is the place where you can save your images and their version. Like GitHub, GitLab, Bitbucket, there are also different docker hubs.

Sure the most popular is Docker hub. But the most modern companies provides their own image registries.

Docker login

To publish image to registry you should have credentials there. Than login throw the terminal. https://docs.docker.com/engine/reference/commandline/login/

So open your terminal enter

Publish image

To publish the image we need to create a tag and than push it.

In the example bellow we ll push image to latest and 0.0.1.

Than you ll see two versions in your hub account.

Thank you for your attention

Thank you for your attention. If you have any questions feel free to contact me. I‘ll be glad to help you.

LinkedIn, Twitter, Google+, https://lytvynov-anton.com

Senior web developer, architect, cryptocurrencies trader, https://lytvynov-anton.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store