Home > database >  How to save a file into docker
How to save a file into docker

Time:12-01

I am trying to Dockerize a fastapi project that uses MySQL and Selenium.

The selenium should do a form of auto-application of job on jobserve.com. My files has been saved successfully as a BLOB in the database. But I need to attach these files(CV) from the database while auto-applying.

Do I need a form of FileServer to save the files to the Docker host or there is a way I can attach the files directly from the database without saving to the host.

CodePudding user response:

As per your requirement, you can save your file volume in the docker and pass the path of your file into the database.

you can use the following command to create the volume:

docker volume create [OPTIONS] [VOLUME]

Read about creating volume here: https://docs.docker.com/engine/reference/commandline/volume_create/#usage

  • Related