question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

6reactions
stevemclarkecommented, May 13, 2020

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)

2reactions
JeremyRousselcommented, May 11, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dockerfile reference - Docker Documentation
Docker runs instructions in a Dockerfile in order. A Dockerfile must begin with a FROM instruction. This may be after parser directives, comments,...
Read more >
What is "/app" working directory for a Dockerfile?
The WORKDIR instruction sets the working directory for any RUN, CMD, ENTRYPOINT, COPY and ADD instructions that follow it in the Dockerfile. If ......
Read more >
Working with Dockerfiles - buildVirtual
Dockerfile Instructions · FROM : Initializes a new build stage and sets the Base Image · RUN : Will execute any commands in...
Read more >
A Docker Tutorial for Beginners
Learn to build and deploy your distributed applications easily to the cloud with Docker.
Read more >
Understanding Docker Build Args, Environment Variables and ...
When working with Docker, you'll stumble over lots of confusing details. ... You can define variables inside of a Dockerfile, to help you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found