Skip to content

Sources for a Docker image that provides a docker executable

License

Notifications You must be signed in to change notification settings

capybara1/Docker-Docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker

Motivation

Primarily an image that provides a docker binary to control docker from within a container. For common tasks scripts are provided that may be used during execution.

Script Purpose
/usr/local/bin/backup-volume Backup one or more volumes
/usr/local/bin/restore-volume Restore one or more volumes from a backup

Inspirations

The volume backup/restore scripts are inspired by the following articles

Usage

Command Line

Arbitrary command

docker run \
  --rm \
  --init \
  -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  capybara1/docker:1.0 \
  my-command

Backup volume

docker run \
  --rm \
  --init \
  -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v my_vol1:/source/my_vol1 \
  -v my_vol2:/source/my_vol2 \
  -v /backup:/target \
  capybara1/docker:1.0 \
  /usr/local/bin/backup-volume --container=my_container my_vol1 my_vol2

Restore volume

docker run \
  --rm \
  --init \
  -it \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /backup:/source \
  -v my_vol1:/target/my_vol1 \
  -v my_vol2:/target/my_vol2 \
  capybara1/docker:1.0 \
  /usr/local/bin/restore-volume --container=my_container my_vol1 my_vol2

About

Sources for a Docker image that provides a docker executable

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published