Skip to content

Commit 56d99c2

Browse files
Update docker
1 parent e503b22 commit 56d99c2

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

DockerCommands/docker

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ Docker:-Container
33
apt-get update
44
apt-get install docker.io
55
docker --version
6+
docker version
7+
docker info
8+
docker
69
docker hub--->docker engine-->Docker images---> run,stop,deleted
710

811
docker pull ubuntu
@@ -49,6 +52,14 @@ docker commit 99f528fc4261 ramansharma95/apache
4952
docker push ramansharma95/apache
5053
check in the docker hub
5154

55+
-----------Create Local Docker registry
56+
57+
docker container run -d -p 5000:5000 --name local_registry registry
58+
http://<serverip>:5000/v2/_catalog
59+
docker container inspect local_registry
60+
docker image tag ubuntu localhost:5000/ubuntu:latest
61+
docker image push localhost:5000/ubuntu
62+
docker image pull localhost:5000/ubuntu
5263

5364
--------Docker file
5465

@@ -72,7 +83,7 @@ RUN apt-get update
7283
RUN apt-get -y install apache2
7384
ADD . /var/www/html
7485
ENTRYPOINT apachectl -D FOREGROUND
75-
ENV name DEVOPS raman
86+
ENV name DEVOPS
7687

7788
Create an html file in the current directory.(index.html)
7889
Build the docker file

0 commit comments

Comments
 (0)