diff --git a/docs/tutorial/multi-container-apps/index.md b/docs/tutorial/multi-container-apps/index.md index 844eb4a..6a91af2 100644 --- a/docs/tutorial/multi-container-apps/index.md +++ b/docs/tutorial/multi-container-apps/index.md @@ -169,7 +169,7 @@ With all of that explained, let's start our dev-ready container! ```bash hl_lines="3 4 5 6 7" docker run -dp 3000:3000 \ - -w /app -v $PWD:/app \ + -w /app -v ${PWD}:/app \ --network todo-app \ -e MYSQL_HOST=mysql \ -e MYSQL_USER=root \ diff --git a/docs/tutorial/using-bind-mounts/index.md b/docs/tutorial/using-bind-mounts/index.md index e7c6c8f..b53c403 100644 --- a/docs/tutorial/using-bind-mounts/index.md +++ b/docs/tutorial/using-bind-mounts/index.md @@ -40,7 +40,7 @@ So, let's do it! ```bash docker run -dp 3000:3000 \ - -w /app -v $PWD:/app \ + -w /app -v ${PWD}:/app \ node:12-alpine \ sh -c "yarn install && yarn run dev" ``` diff --git a/docs/tutorial/using-docker-compose/index.md b/docs/tutorial/using-docker-compose/index.md index 950d4a9..c8c9ac4 100644 --- a/docs/tutorial/using-docker-compose/index.md +++ b/docs/tutorial/using-docker-compose/index.md @@ -53,7 +53,7 @@ To remember, this was the command we were using to define our app container. ```bash docker run -dp 3000:3000 \ - -w /app -v $PWD:/app \ + -w /app -v ${PWD}:/app \ --network todo-app \ -e MYSQL_HOST=mysql \ -e MYSQL_USER=root \ @@ -102,7 +102,7 @@ docker run -dp 3000:3000 \ - 3000:3000 ``` -1. Next, we'll migrate both the working directory (`-w /app`) and the volume mapping (`-v $PWD:/app`) by using +1. Next, we'll migrate both the working directory (`-w /app`) and the volume mapping (`-v ${PWD}:/app`) by using the `working_dir` and `volumes` definitions. Volumes also has a [short](https://docs.docker.com/compose/compose-file/#short-syntax-3) and [long](https://docs.docker.com/compose/compose-file/#long-syntax-3) syntax. One advantage of Docker Compose volume definitions is we can use relative paths from the current directory. @@ -331,4 +331,4 @@ using into the appropriate compose format. At this point, we're starting to wrap up the tutorial. However, there are a few best practices about image building we want to cover, as there is a big issue with the Dockerfile we've been using. So, -let's take a look! \ No newline at end of file +let's take a look!