unclear instructions, hard to start, where to create Dockerfile, how to set the docker working directory
See original GitHub issueI am new to docker and I try to follow your “Getting started” example and it is not clear what to do:
Building the App’s Container Image Create a file named Dockerfile with the following contents
Where it should be created? In any place? In a specific place?
Build the container image using the docker build command.
docker build -t getting-started .
This command used the Dockerfile to build a new container image.
Where this command should be executed? in a command line? in a Powershell? in Visual Studio Code? Why Visual Studio is used in the instruction if it is not used for anything? How the docker should know wich Dockerfile to use? Does it mean that the Dockerfile should be not anywhere but in a special place? A file named Dockerfile needs to be created in a special place (where?) and when the command above is called then docker knows which file to use and will build an image which we called “getting-started”?
How the docker should know where the /app directory is located? Does it mean the docker needs to be started in the directory above the /app directory? How? And maybe the Dockerfile also should be located in the directory above the /app directory?
Maybe before calling the docker build -t getting-started .
the user should change the directory to the parent folder of the app-folder?
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:8 (2 by maintainers)
Top GitHub Comments
Ran into this problem trying to get the todo list app running, consistently getting cannot find module. Suggested instructions for new users: -Dockerfile needs to be saved under /app -for windows users a note that the file name is “Dockerfile” without an extension is needed, otherwise windows default text editors will append .txt which will error out on build (this includes Notepad++) -build cmd needs to be run from /app in the interpreter (cmdline/powershell etc)
These are excellent comments, I’m also just starting and have struggled for several hours trying to start the app container but keep getting path errors because the instructions are not clear on where to put the files and in what directory structure.