Docker Image Registry
Docker image registry is used to store images in it. In this article, you will lean Docker image registry. We will create docker container and use docker-hub to push contains in it.
You can run the docker app by executing “docker run” locally. Docker can be run locally for the development purposes.
To make an image available to the Kubernetes, you need to push the image to a Docker Registry, like Docker hub or a private Docker registry.
If you want to use Docker hub, then first create an account on Docker Hub, then you can push any locally build images to the Docker Registry.
Following are the steps to push an image to Docker hub:
$ docker login
$ docker tag IMAGEID YOUR_LOGIN/IMAGE_NAME:TAG_ID
$ docker push YOUR_LOGIN/IMAGE_NAME:TAG_ID
Or, to immediately tag an image during the build process:
$ docker build -t YOUR_LOGIN/IMAGE_NAME:TAG_ID
$ docker build -t vermanotes/nodejs-express:0.0.1
You can build and deploy applications you want using docker and Kubernetes, with following few limitations
- You should only run one process in one container
- Don’t try to create one giant docker image for your app, but split it up if necessary.
- All the data in the container is not preserved, when a container stops, all the changes within a container are lost.
- You can preserve data, using volumes, which is covered later in this course.
- For more tips, checkout the 12-factor app methodology at 12factor.net
259 total views, 1 views today