Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

create and run docker registry

docker run -d -p 5000:5000 --restart=always --name my-registry registry:2


#To check the list of images pushed , use
curl -X GET localhost:5000/v2/_catalog


#to push some images to our registry server.

#Let's push two images for now .i.e. nginx:latest and httpd:latest.

Run:
docker pull nginx:latest 

then 
docker image tag nginx:latest 
localhost:5000/nginx:latest 


and finally push it using 
docker push localhost:5000/nginx:latest.

#We will use the same steps for the second

image docker pull httpd:latest 
and then

docker image tag httpd:latest 

localhost:5000/httpd:latest 

and finally push it using
docker push localhost:5000/httpd:latest



docker image prune -a
#WARNING! 
This will remove all images without at least one container associated to them.

docker image ls
#to view number of images

#to pull images from local server
docker pull [server-addr/image-name]

docker pull localhost:5000/nginx

#to stop and remove registry 
Use: docker stop my-registry and then docker rm my-registry
Comment

PREVIOUS NEXT
Code Example
Shell :: how to search forward in emacs 
Shell :: how to start a web server linux 
Shell :: zsh: command not found: nvm 
Shell :: restart cronjob 
Shell :: is linux good 
Shell :: linux volume max or muted 
Shell :: how to send desktop notification in ubuntu 
Shell :: tail colored 
Shell :: connect git to github 
Shell :: scss in gatsby 
Shell :: how to download playonlinux 
Shell :: bash flatten directory 
Shell :: nx run storybook 
Shell :: how ro rename a foldre powershell 
Shell :: mate-polkit-bin for ubuntu 
Shell :: vncviewer display 0 
Shell :: failed to get canoncal path of airootfs 
Shell :: run elasticsearch stop 
Shell :: linux snap app list 
Shell :: .sh script: check if file exist 
Shell :: get username linux 
Shell :: shell break while loop 
Shell :: How do I select which GPU to run a job on? 
Shell :: power is network connected 
Shell :: how to fix network issues on ubuntu 
Shell :: bash ask for input 
Shell :: google drive linux 
Shell :: remove debian gnu/linux - continue with install process 
Shell :: add code to github repository from command line 
Shell :: hugo serve 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =