1

I need to do a docker image to process data from a file. How can I do an image to process a file at runtime?

Thanks

Marcos Vidolin
  • 186
  • 4
  • 21
  • One of Docker's key goals is to isolate container processes from the host filesystem; if working on local files is a key goal of your application then it's often better to not try to run it in Docker. Can you give a more concrete example of what you're trying to run, what you've tried already, and what problems you're running into? – David Maze Oct 20 '19 at 23:56
  • Thanks, I have a node script with all dependencies to process some kind of files and I want to create an image of this environment. I also need to pass a service account file to the script access authenticate in the service. This is not o application that runs on a server but is like a tool for developers. I think that I need to work with "volumes" and passing the file name as arguments or env. – Marcos Vidolin Oct 21 '19 at 11:44
  • My second guess, Instead, I create a docker image I just create a Nodejs command-line tool to wrap all these things. – Marcos Vidolin Oct 21 '19 at 11:55
  • You can encapsulate all of your dependencies in the Node `package.json` file. I'd expect the typical developer to be very comfortable with cloning a repository and running `yarn install`. – David Maze Oct 21 '19 at 11:56
  • Yeap I think that's the best way. Thanks @DavidMaze – Marcos Vidolin Oct 21 '19 at 15:16

1 Answers1

0

Docker is designed to isolate the os filesystem from the docker instance. Could you perhaps use AWS S3 to upload the said file and then use your code within the docker process to retrieve and process the file? Either way we have too little information to go on.