From 9b952f5105db1a10db96d803a79f989900624c63 Mon Sep 17 00:00:00 2001 From: stiezinger Date: Thu, 13 May 2021 17:46:33 +0200 Subject: [PATCH] fixed base image reference --- docs/tutorial/using-bind-mounts/index.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/tutorial/using-bind-mounts/index.md b/docs/tutorial/using-bind-mounts/index.md index 29138b8..73d029e 100644 --- a/docs/tutorial/using-bind-mounts/index.md +++ b/docs/tutorial/using-bind-mounts/index.md @@ -41,7 +41,7 @@ So, let's do it! ```bash docker run -dp 3000:3000 \ -w /app -v "$(pwd):/app" \ - node:12-alpine \ + getting-started \ sh -c "yarn install && yarn run dev" ``` @@ -50,15 +50,15 @@ So, let's do it! ```powershell docker run -dp 3000:3000 ` -w /app -v "$(pwd):/app" ` - node:12-alpine ` + getting-started ` sh -c "yarn install && yarn run dev" ``` - `-dp 3000:3000` - same as before. Run in detached (background) mode and create a port mapping - `-w /app` - sets the "working directory" or the current directory that the command will run from - `-v "$(pwd):/app"` - bind mount the current directory from the host in the container into the `/app` directory - - `node:12-alpine` - the image to use. Note that this is the base image for our app from the Dockerfile - - `sh -c "yarn install && yarn run dev"` - the command. We're starting a shell using `sh` (alpine doesn't have `bash`) and + - `getting-started` - the image to use. Note that this is the base image for our app from the Dockerfile + - `sh -c "yarn install && yarn run dev"` - the command. We're starting a shell using `sh` (getting-started doesn't have `bash`) and running `yarn install` to install _all_ dependencies and then running `yarn run dev`. If we look in the `package.json`, we'll see that the `dev` script is starting `nodemon`.