Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unclear instructions, hard to start, where to create Dockerfile, how to set the docker working directory #29

Closed
aisbergde opened this issue May 11, 2020 · 8 comments · Fixed by #34

Comments

@aisbergde
Copy link

I 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?

@JeremyRoussel
Copy link

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.

@stevemclarke
Copy link

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)

@aisbergde
Copy link
Author

aisbergde commented May 13, 2020

This is helpful!

When I use a "getting started" app, it would be a good idea to give some more information to really getting started. Why not to link this: https://docs.docker.com/get-started/overview/ and then demonstrate this a little bit? There are images and containers explained, why not to link from inside the getting started app to some points in the documentation?

it looks like there (at docs.docker.com) is a lot of good documentation, but I miss the link between the "getting started" app and some "easy getting started" information. A new user should be enabled to get started based on the steps in the "getting started" app to get a quick learning success.

So what is the result? I did not start because the "getting started" is "to complicated" for me.

I used some other apps, which are using docker, following there instructions and using docker as a "black box", not really understanding what happens in docker.

BTW, this was the reason why I was interested in trying docker: "What a great idea, to build apps, which can work on Windows, Unix, Mac, ...!" Maybe I should learn?

But because I am even not able to run through the "getting started" app, my conclusion is:
"Maybe I am a stupid old white man, who is not able to start with docker technology. Let the young people work with docker which are not so stupid like me."

And because I hope that I am not to stupid to start with docker I opened this issue :-)

@StefanScherer
Copy link
Member

Thank you @aisbergde for the time writing this valuable feedback. Thanks @JeremyRoussel and @stevemclarke as well.
This gives us many details where and how we should improve the getting started guide.
It looks we forgot to make many steps more precise. We‘re looking into this.

@stevemclarke
Copy link

stevemclarke commented May 13, 2020

@StefanScherer @mikesir87 I was digging a bit further - maybe mention the path options as well? e.g.
docker build (path to app) -f (path to Dockerfile if not in root of app)

@djgogga
Copy link

djgogga commented May 14, 2020

I was also having the same issue. I put the Dockerfile under /app and found that VS Code names the file with .txt extension (even though I did not add the extension), so I had to rename it. It worked after that. (Windows 10 Pro)

Got further along. But the tutorial is not good. I only got past the one and ran into another issue on the next step. And in DockerDestop I am seeing a lot of other containers pop up as I am doing this tutorial. Containers that I did not download or start. Seems dodgy.

@JonRobertson
Copy link

I installed Docker Desktop in Windows 10 and went through the Getting Started tutorial/container. The instructions were fairly clear to me up until "Using Mount Points", where the -w and -v parameters were introduced and used ${PWD}: as part of the parameter. The tutorial needs to include commands that work in Windows as well as *nix.

That page also discusses looking at the logs and running nodemon. I have no idea if nodemon should be ran in the Windows command shell (nodemon is not installed as part of Docker Desktop) or I should have been in a *nix shell. I did open the cli for the container but the nodemon command did not work there either.

Once the tutorial got to mysql and multi-container apps, things went downhill. I was able to get mysql running in a container and issue sql commands (such as SHOW DATABASES). But I was not able to get the to-do app to launch. Docker complained because it could not find package.json in the app folder. I tried various ways of specifying the paths for -w and -v but was unable to construct a valid command so the todo container would start. It isn't clear from the tutorial whether the paths for -w or -v are local Windows paths or paths inside the container.

@StefanScherer
Copy link
Member

I've created a PR #34 to clarify where the Dockerfile (without .txt extension) should be created and where to go in a terminal before the first docker build command. I hope that will help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants