typo in 'Using bind mounts' section of getting started tutorial

オープン
#358 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, node.js
領域
documentation

調査の方向性

Start in the getting started tutorial's “Using bind mounts” section and compare the node:18-alpine commands with the Dockerfile's node:12-alpine base image. Reproduce the documented build, confirm which image and install command work together, then update both shell and PowerShell examples so the tutorial completes successfully.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
JavaScript
スター
3.1k
フォーク
6.4k
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

docker/getting-started のほかの issue

docker/getting-started の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。