Skip to content

Instantly share code, notes, and snippets.

@glinton
Last active August 14, 2017 18:03
Show Gist options
  • Save glinton/71a12d8ffdb42b89e93e3e5351c2b7a7 to your computer and use it in GitHub Desktop.
Save glinton/71a12d8ffdb42b89e93e3e5351c2b7a7 to your computer and use it in GitHub Desktop.
Fetch file from Nanobox launched app
# '##' is a command to be run after modification

# console into your host server (VERY risky! Please do not modify anything unless you fully understand and accept the consequences)
nanobox console my-app do.1

# add your public key (from your laptop) to the authorized_keys file
# DO NOT REMOVE ANYTHING FROM THIS FILE! (Nanobox will fail to work if you do)
## edit `/root/.ssh/authorized_keys` and ADD/APPEND your public key (located on your laptop, generally at ~/.ssh/id_rsa.pub)

# find the container in question
docker ps

# pull the file out of the container
## docker cp <container>:/data/output.csv /root/output.csv

# get the ip of your host
ifconfig eth0

# run on your laptop to copy the file down
## scp root@<IP_FROM_PREVIOUS>:/root/output.csv .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment