Merge pull request #14778 from StefanScherer/use-bind-mounts-m1

Add command for M1/arm64 users
This commit is contained in:
Usha Mandya 2022-05-25 15:16:24 +01:00 committed by GitHub
commit fca511fbcd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -58,6 +58,15 @@ So, let's do it!
sh -c "yarn install && yarn run dev"
```
If you are using an Apple silicon Mac or another ARM64 device, then use the following command.
```bash
$ docker run -dp 3000:3000 \
-w /app -v "$(pwd):/app" \
node:12-alpine \
sh -c "apk add --no-cache python2 g++ make && 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