Skip to content

Instantly share code, notes, and snippets.

@lightsofapollo
Created February 24, 2015 02:16
Show Gist options
  • Save lightsofapollo/6c606461cd58572c99e9 to your computer and use it in GitHub Desktop.
Save lightsofapollo/6c606461cd58572c99e9 to your computer and use it in GitHub Desktop.
#! /bin/bash -ex
# This script copies the contents of the "scripts" folder into a docker
# container using tar/untar the container id must be passed.
DIRNAME=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
docker exec $1 mkdir -p $2
cd $DIRNAME
tar -cv * | docker exec -i $1 tar -x -C $2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment