docs icon indicating copy to clipboard operation
docs copied to clipboard

[Node.js docs feedback]

Open ziedHamdi opened this issue 4 years ago • 1 comments

Problem description

I had to search a lot on the net to get it work somehow (still struggling after 2h despite my 20 years experience in software development)

Problem location

  • I saw a problem on the following URL: https://docs.docker.com/language/nodejs/build-images/

  • I couldn't find the information I wanted: Starting docker build was throwing errors I couldn't understand:

  • the doc says we have to launch docker build --tag node-docker but that didn't work, after some research I found I had to launch : docker build -f ./Dockerfile . --tag wa-back

  • the name of the file Docker didn't work, I had to rename it to Dockerfile to get it work

  • I couldn't find where to get the list of available versions of node (once found I didn't know how to use it), I've put FROM node:14.17.3

  • but running docker images didn't show the node image

  • $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE wa-back latest d4bed6295cf2 About an hour ago 1.16GB Done in 0.71s.

  • A webstorm plugin helped me choose FROM node:14.17.3-alpine but this created an image that I suspect not be the right one since it was generated an hour ago:

  • $ docker images REPOSITORY TAG IMAGE ID CREATED SIZE wa-back latest b029ac8d4389 About an hour ago 335MB d4bed6295cf2 About an hour ago 1.16GB Done in 1.05s.

  • the .dockerignore file contains only one dir, so if I want to add some, I don't know how to do it right

  • Other: Still struggling to troubleshoot why things don't work, from the tutorial, I don't know how to remove that 1GB image to clear and retry

Suggestions for a fix

I think there should be a troubleshooting section on each page to guide us on what to do if things didn't work, and there should be links to documentation about specific sections like (how to delete an image, how to know what's inside it, etc...)

ziedHamdi avatar Jul 27 '21 14:07 ziedHamdi

Hi @ziedHamdi, thanks for sharing the issues. Please share the initial error you received with the docker build --tag node-docker command so that we can identify any issues in the documentation. It seems like the other issues were caused by veering from the tutorial after the initial error.

Details about the dockerignore file can be found at: https://docs.docker.com/engine/reference/builder/#dockerignore-file

If you need support and help troubleshooting, please join the Community Slack https://join.slack.com/t/dockercommunity/shared_invite/zt-1hl072yfr-ADKgaYgcv3AUTzd9BWtkwA

craig-osterhout avatar Oct 12 '22 22:10 craig-osterhout

Closing as unable to duplicate following the current docs. The only thing I noticed is the command you specified, docker build --tag node-docker, should be docker build --tag node-docker .

craig-osterhout avatar Oct 20 '22 20:10 craig-osterhout

Hi Craig,

Sorry for me not anwsering, I missed the notification for your previous answer.

I forgot the context in which I had that error, I somehow managed to get things working.

ziedHamdi avatar Oct 21 '22 08:10 ziedHamdi

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

/lifecycle locked

docker-robott avatar Mar 22 '23 03:03 docker-robott