简体   繁体   中英

Save the output dataframe from docker to a local machine

Tried with {WORKDIR} & replaced {ADD} with {COPY} in Dockerfile. Still the CSV file is not being saved in the local folded in the local machine, why is this?

In order to write to a host file from the Docker container, first volume mount a directory into the running container.

For example, we can mount the current working directory into a directory in the container:

$ docker run -v $(PWD):/pwd_in_container -it --rm busybox touch /pwd_in_container/test

Then the file we created in the container will be available on the host:

$ ls test
test

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM