0

I've created my own docker image which contains two nodejs applications. Both applications read from one file and then output a different file.

How do I input the source file and get the output file on my local file system?

2
  • Give serious consideration to just running the applications locally. You won’t need special software setup (just Node), you won’t need administrator permission to run the program, and you won’t need weird filesystem remapping tricks. Commented Oct 10, 2018 at 14:02
  • 1
    You can bind the volume to the image and give its location in the Dockerfile Commented Oct 10, 2018 at 14:05

1 Answer 1

3

You can mount a volume when running the container using the -v flag (more info here). This will give the container access to a directory on your local system and all files written to the mapped volume will be persisted on your local volume.

docker run -v /full/path/to/source:/path/inside/container imagename

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.