Skip to content

Instantly share code, notes, and snippets.

@chazer
Last active March 16, 2022 12:14
Show Gist options
  • Save chazer/fa0934ded20b0881a9eea1e195cc5405 to your computer and use it in GitHub Desktop.
Save chazer/fa0934ded20b0881a9eea1e195cc5405 to your computer and use it in GitHub Desktop.
Docker cheats

Copy volume

docker run --rm \
  -v "$VOLUME_FROM":/from:ro \
  -v "$VOLUME_TO":/to \
  -u root alpine \
  sh -c 'rm -rf /to 2>/dev/null; cd /from; cp -av . /to'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment