User Tools

Site Tools


docker:index

Docker

Command reference

  • Build with docker build -t jde/graou .
  • Run foreground with docker run -ti jde/graou <optional commands or arguments like bash>
  • Run background with docker run -d jde/graou <optional commands or arguments>
  • Connect to the docker hub : docker login. For a private hub, use docker login <private_hub>
  • Pull and push images with docker push adyxax/phpipam:1.2 or docker pull adyxax/phpipam:1.2
  • Set an autostart policy for a running container : docker update –restart=unless-stopped phpipam
  • Migrate a data volume from one host to another :
export VOLUME=tiddlywiki
export DEST=10.1.0.242
docker run --rm -v $VOLUME:/from alpine ash -c "cd /from ; tar -cpf - . " \
| ssh $DEST "docker run --rm -i -v $VOLUME:/to alpine ash -c 'cd /to ; tar -xfp - ' "
  • cleaning : docker system prune -f -a

Miscellaneous

docker/index.txt · Last modified: 2019/02/04 10:19 by adyxax