/docker-recreate

Docker CLI plugin for quickly recreating running containers without losing their configuration

Primary LanguageGo

Docker Recreate

Docker CLI plugin for recreating docker containers while keeping their configuration (but updating their image).

Installation

  1. Download docker-recreate for your platform from the latest release
  2. Copy it to:
    • Windows: c:\Users\<your user>\.docker\cli-plugins\docker-recreate.exe
    • Mac and Linux: $HOME/.docker/cli-plugins/docker-recreate
  3. On Mac and Linux make it executable with chmod +x $HOME/.docker/cli-plugins/docker-recreate

Or alternatively for Linux run the following:

mkdir -p ~/.docker/cli-plugins
curl https://github.com/andreccosta/docker-recreate/releases/latest/download/docker-recreate-linux-amd64 -L -s -S -o ~/.docker/cli-plugins/docker-recreate
chmod +x ~/.docker/cli-plugins/docker-recreate

Or for Mac:

mkdir -p ~/.docker/cli-plugins
curl https://github.com/andreccosta/docker-recreate/releases/latest/download/docker-recreate-darwin-amd64 -L -s -S -o ~/.docker/cli-plugins/docker-recreate
chmod +x ~/.docker/cli-plugins/docker-recreate

Usage

docker recreate [-pull] NAME