I apologize if this is trivial for some – but what would be your recommended way to transfer data between my local files and the Rstudio on the Docker? I can use Filezilla to access my Droplet folder, but would like to view RStudio’s working directory, which was simply “/home/rstudio”.
Ideally, I would like to simply upload some .csv files to the Droplet, run some analyses in the Docker, export some documents and load them on my local computer, but it is not intuitively clear what would be the most efficient way to achieve this goal.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
You can use the docker cp command. This will allow you to transfer in and out of your docker container. Here is the documentation of this command: https://docs.docker.com/engine/reference/commandline/cp/#usage
Essentially, you run
docker cp CONTAINER:PATH_TO_FILE DEST_PATH
Obviously, you replace CONTAINER with the name of your container, and you fill in the file paths.
If you want to execute commands in a docker container (to edit files), you can use the docker exec command. Here is some documentation of this command: https://docs.docker.com/engine/reference/commandline/container_exec/#description
Here, you essentially run
docker CONTAINER exec -it COMMAND
Obviously, you replace CONTAINER with the name of your container and you replace COMMAND with whatever command you would like to run.
Hope this helps!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.