diff --git a/get-started/index.md b/get-started/index.md index cc548708bc..13022e47e8 100644 --- a/get-started/index.md +++ b/get-started/index.md @@ -146,7 +146,7 @@ Docker version 19.03.5, build 633a0ea 3. List the `hello-world` container (spawned by the image) which exits after displaying its message. If it is still running, you do not need the `--all` option: ```shell - $ docker container ls --all + $ docker ps --all CONTAINER ID IMAGE COMMAND CREATED STATUS 54f4984ed6a8 hello-world "/hello" 20 seconds ago Exited (0) 19 seconds ago diff --git a/get-started/part2.md b/get-started/part2.md index ac683a5092..cfa543a7a1 100644 --- a/get-started/part2.md +++ b/get-started/part2.md @@ -141,7 +141,7 @@ Now that you have some source code and a Dockerfile, it's time to build your fir Make sure you're in the directory `node-bulletin-board/bulletin-board-app` in a terminal or PowerShell using the `cd` command. Let's build your bulletin board image: ```script -docker image build -t bulletinboard:1.0 . +docker build --tag bulletinboard:1.0 . ``` You'll see Docker step through each instruction in your Dockerfile, building up your image as it goes. If successful, the build process should end with a message `Successfully tagged bulletinboard:1.0`. @@ -153,7 +153,7 @@ You'll see Docker step through each instruction in your Dockerfile, building up 1. Start a container based on your new image: ```script - docker container run --publish 8000:8080 --detach --name bb bulletinboard:1.0 + docker run --publish 8000:8080 --detach --name bb bulletinboard:1.0 ``` There are a couple of common flags here: @@ -169,10 +169,10 @@ You'll see Docker step through each instruction in your Dockerfile, building up 3. Once you're satisfied that your bulletin board container works correctly, you can delete it: ```script - docker container rm --force bb + docker rm --force bb ``` - The `--force` option removes the running container. + The `--force` option removes the running container. If you stop the container running with `docker stop bb` you do not need to use `--force`. ## Conclusion diff --git a/get-started/part3.md b/get-started/part3.md index c61088567a..04f5c6f70d 100644 --- a/get-started/part3.md +++ b/get-started/part3.md @@ -45,13 +45,13 @@ At this point, you've set up your Docker Hub account and have connected it to yo 3. Now you are ready to share your image on Docker Hub, but there's one thing you must do first: images must be *namespaced correctly* to share on Docker Hub. Specifically, you must name images like `/:`. You can relabel your `bulletinboard:1.0` image like this (of course, please replace `gordon` with your Docker ID): ```shell - docker image tag bulletinboard:1.0 gordon/bulletinboard:1.0 + docker tag bulletinboard:1.0 gordon/bulletinboard:1.0 ``` 4. Finally, push your image to Docker Hub: ```shell - docker image push gordon/bulletinboard:1.0 + docker push gordon/bulletinboard:1.0 ``` Visit your repository in Docker Hub, and you'll see your new image there. Remember, Docker Hub repositories are public by default.