Docker private registry Why we need pvt registry "Security, minimize internet load, speed, control We need to setup registry in three stage , stage one simple stage two secure (with ssl) stage three with authentication Stage one: Step: create directories, need to create below directories a. Create a directory to store docker image b. create a certificate directory c. Auth directory Step :Run a docker registry container Create a container without volume with below command sudo docker run -d -p 5000:5000 --name local-registry registry:2 below is screen shot check in browser: tag the image, command to tag image sudo docker tag centos:7 127.0.0.1:5000/centos:7 Step Push image and check the browser again In ss centos is available, also in container it show as below Stage two Step: create a directory with the name of "docker-registry" then create two direcotries inside it certs data Step: then generate certificate inside certs direct...
Docker Volume before going into docker volume lets clear docker file system first. The Docker File System A Docker image is a collection of read-only layers. When we launch a container from an image, Docker adds a read-write layer to the top of that stack of read-only layers. Docker calls this the "Union File System" . Any time a file is changed, Docker makes a copy of the file from the read-only layers up into the top read-write layer. This leaves the original (read-only) file unchanged. When a container is deleted, that top read-write layer is lost. This means that any changes made after the container was launched are now gone. ====================================== What is docker volume A Docker volume keep outside the container, on the host machine. From the container, the volume use like a folder which we can use to store and retrieve data. It is simply a mount point to a directory on the host. ====================================== Create docker volume Do...
Comments
Post a Comment