![]() ![]() If /usr/bin/docker is not the correct path to docker Updating when using DietPiĭietPi is a lightweight Debian-based distribution (image) for all kinds of devices like Raspberry Pi, Odroid, NanoPi and others. Put these into cronjob if you want (time can be changed): $ sudo crontab -eĠ 2 * * * sudo systemctl restart rviceĠ 3 * * * sudo /usr/bin/docker system prune -f The prune command will remove the now old container (-f stands for: Do not ask for confirmation). The restart command will stop the container, pull the newest images, run the container again. # - all networks not used by at least one container #be carefull and look which containers you need #WARNING this could delete stopped or unused containers, etc. Updating when using systemd service (in this case Debian/Raspbian) sudo systemctl restart rvice Updating when using docker-compose docker-compose down ![]() Watchtower can periodically check for an update to the Docker image, pull the updated image, and recreate the container using the updated image. ![]() You can also use a tool like Watchtower to automate the update process. # Alternatively you can keep data container around for future updates in which case you can skip last step. # Optionally remove the intermediate container # Create intermediate container to preserve dataĭocker run -volumes-from vaultwarden -name vaultwarden_data busybox trueĭocker run -d -volumes-from vaultwarden_data -name vaultwarden -p 80:80 vaultwarden/server:latest Then visit In case you didn't bind mount the volume for persistent data, you need an intermediate step where you preserve the data with an intermediate container: # Pull the latest version # Start new container with the data mountedĭocker run -d -name vaultwarden -v /vw-data/:/data/ -p 80:80 vaultwarden/server:latest If you used the bind-mounted path as in the example here, you just need to pull the latest image, stop and rm the current container and then start a new one the same way as before: # Pull the latest version Updating is straightforward, you just make sure to preserve the mounted volume. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |