Docker CLI plugin for recreating docker containers while keeping their configuration (but updating their image).
- Download
docker-recreate
for your platform from the latest release - Copy it to:
- Windows:
c:\Users\<your user>\.docker\cli-plugins\docker-recreate.exe
- Mac and Linux:
$HOME/.docker/cli-plugins/docker-recreate
- Windows:
- 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
docker recreate [-pull] NAME