Skip to content

Commit

Permalink
content refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
robrich committed Feb 20, 2024
1 parent 4e6d532 commit 1f5b785
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions 02-Hello-Docker/start/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ Optional: Build a `package.json` file

If you referenced `npm` commands in your Dockerfile such as `npm install` or `npm start`, the process will fail later noting there is no package.json file. Let's create one.

You'll need [Node.js](https://nodejs.org/en/download) installed to do this step. If you don't have Node.js installed, you can skip this part.

1. From a terminal in the folder with the `Dockerfile` and `server.js` file, run this command from a command prompt:

```
Expand Down
14 changes: 7 additions & 7 deletions 03-Multi-stage-build/start/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -292,12 +292,12 @@ Step 11: Prune unnamed images
Is it still there? Run `docker container list --all` and see if there's a running container.
Bonus Step: Docker-compose
Bonus Step: Docker Compose
--------------------------
`docker-compose` is the precursor to Docker Swarm, the production orchestrator by Docker. We're not going to use Docker Swarm. We're going to use Kubernetes instead. So we won't spend a lot of time on `docker-compose` in this course.
`docker compose` is the precursor to Docker Swarm, the production orchestrator by Docker. We're not going to use Docker Swarm. We're going to use Kubernetes instead. So we won't spend a lot of time on `docker compose` in this course.
`docker-compose` is really handy as it contains a simple structure for both the `docker build ...` command arguments and the `docker run ...` arguments.
`docker compose` is really handy as it contains a simple structure for both the `docker build ...` command arguments and the `docker run ...` arguments.
I've provided a sample `docker-compose.yml` file for us to play with.
Expand All @@ -306,20 +306,20 @@ I've provided a sample `docker-compose.yml` file for us to play with.
2. Run this:
```
docker-compose up -d
docker compose up -d
```
This will both build the image and run the container. Like the `docker run` command, leave off the `-d` to show console output from the container.
3. Open a browser to [http://localhost:5000/](http://localhost:5000/) to see the running site.
4. To stop docker-compose run this:
4. To stop docker compose run this:
```
docker-compose down
docker compose down
```
If you instead choose to stop the container with `docker stop ...`, Docker-compose will notice the stack is incomplete and start a new container.
If you instead choose to stop the container with `docker stop ...`, Docker Compose will notice the stack is incomplete and start a new container.
**Note:** If you'd rather use the old builder instead of BuildKit run this:
Expand Down
2 changes: 1 addition & 1 deletion 08-Service/start/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Step 2: Schedule the service

This command tells us a lot about the service including the `NodePort` that Kubernetes randomly picked.

4. Open a browser to `http://localhost:NODE_PORT/`, replacing `NODE_PORT` with the `NodePort` you found in step 3. When I ran step 3, I got port `32012` so I'll browse to `http://localhost:32012`.
4. Open a browser to `http://localhost:NODE_PORT/`, replacing `NODE_PORT` with the `NodePort` you found in step 3. When I ran step 3, I got `NodePort: <unset> 32012/TCP` so I'll browse to `http://localhost:32012`. (Why does it say "unset" first? Because we didn't give [the service's port a name](https://stackoverflow.com/questions/42528409/kubernetes-what-does-unset-mean-in-port-in-a-service).)


What happened
Expand Down

0 comments on commit 1f5b785

Please sign in to comment.