From 51900f18386825917c4b0c4da3319dfb0b2a9507 Mon Sep 17 00:00:00 2001 From: Abirama Krishnan Date: Thu, 14 Dec 2023 21:06:05 +0530 Subject: Update docker.html.markdown with added spaces for clarity (#4807) --- docker.html.markdown | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'docker.html.markdown') diff --git a/docker.html.markdown b/docker.html.markdown index 0e61151e..17f803f4 100644 --- a/docker.html.markdown +++ b/docker.html.markdown @@ -187,7 +187,7 @@ $ docker exec -it 7b272 bash # directory. Here 7b272 was our ubuntu container and the above command would # help us interact with the container by opening a bash session. -$docker logs +$ docker logs # Displays the information logged by the specified container # root@7b27222e4bb7:/# whoami # root @@ -245,11 +245,11 @@ image to run ( or build) it. ```bash -$docker build +$ docker build # used to build an image from the specified Dockerfile # instead of path we could also specify a URL # -t tag is optional and used to name and tag your images for e.g. -# `$docker build -t my-image:0.1 ./home/app` +# `$ docker build -t my-image:0.1 ./home/app` # rebuild images everytime you make changes in the dockerfile ``` @@ -264,15 +264,15 @@ as part of the source image name. We need to create the target image with the tag name of username/image-name much like GitHub repositories. ```bash -$docker login +$ docker login # to login to Docker Hub using your username and password -$docker tag [:] [:] +$ docker tag [:] [:] # this tags a local src-image to a public target-image # e.g. `docker tag my-sample-app:1.0.0 akshitadixit/my-sample-app` # if tags are not specified, they're defaulted to `latest` -$docker push [:] +$ docker push [:] # uploads our image to Docker Hub # e.g. `docker push akshitadixit/my-sample-app` # this image will be accessible under your profile's repositories as -- cgit v1.2.3