typo in 'Using bind mounts' section of getting started tutorial
dannz89 opened this issue · 0 comments
The part of the tutorial that reads as below had me failing builds with a log full of g++ compiler errors for hours. The culprit was the 18-alpine. The tutorial starts off using 12-alpine (in its Dockerfile) then moves to 18 on this page (but does not suggest changing the Dockerfile). It then fails to find sqlite3 libraries on the image so tries to fetch binaries but in turn fails to find them. It falls back on a src compile which blasts out a spray of - mostly deprecation - warnings and finally chokes on a mismatched parameter (incompatible function params with a library by the looks). Changing the '18' to '12' makes the build work. Changing Dockerfile to 18 may also work - better minds than mine could confirm / correct. But I didn't try it anyway:
docker run -dp 3000:3000 \ -w /app -v "$(pwd):/app" \ node:**18**-alpine \ sh -c "yarn install && yarn run dev"
If you are using PowerShell then use this command.
docker run -dp 3000:3000 ` -w /app -v "$(pwd):/app" ` node:**18**-alpine ` sh -c "yarn install && yarn run dev"
I advise changing to:
> ```
> docker run -dp 3000:3000 \
> -w /app -v "$(pwd):/app" \
> node:**12**-alpine \
> sh -c "apk --no-cache --virtual build-dependencies add python3 make g++ && yarn install && yarn run dev"
> ```
>
> If you are using PowerShell then use this command.
>
> ```
> docker run -dp 3000:3000 `
> -w /app -v "$(pwd):/app" `
> node:**12**-alpine `
> sh -c "apk --no-cache --virtual build-dependencies add python3 make g++ && yarn install && yarn run dev"
Note: The final 'sh -c...' line is also different because I ran into the lack of python on the image as others have. But I see that's been fairly well covered online already.