Docker
Docker Update
This guide explains how to properly update your running ImagePortfolio containers using Docker Compose, while keeping your userdata persistent
Update Steps
Apache Version
1. Stop all running containers
Before updating, you should stop your running containers:
docker compose down
This ensures that no container is accessing old volumes.
2. Remove the appdata volume
You must remove the appdata volume because it contains the old application files.
docker volume rm appdata
Note: Do not remove userdata_volume, as it stores user uploads and dynamic content.
3. Pull the latest Docker images
Download the latest versions of the Apache image:
docker pull cheinisch/lensfolio:latest
4. Start the updated containers
Bring your services back up using Docker Compose:
docker compose up -d
Docker will automatically create a fresh appdata volume containing the new application files.
Nginx Version
1. Stop all running containers
Before updating, you should stop your running containers:
docker compose down
This ensures that no container is accessing old volumes.
2. Remove the appdata volume
You must remove the appdata volume because it contains the old application files.
docker volume rm appdata
Note: Do not remove userdata_volume, as it stores user uploads and dynamic content.
3. Pull the latest Docker images
Download the latest versions of the PHP-FPM and NGINX images:
docker pull cheinisch/lensfolio-php:latest
docker pull cheinisch/lensfolio-nginx:latest
4. Start the updated containers
Bring your services back up using Docker Compose:
docker compose up -d
Docker will automatically create a fresh appdata volume containing the new application files.
Important Notes
Topic | Details |
---|---|
userdata_volume | Do not delete - it keeps uploads and user-generated files. |
appdata_volume | Must be deleted - to refresh the application files from the updated image. |
Images | Always pull the latest versions befor starting containers. |
Full Update Command Sequence
Apache
docker compose down
docker volume rm appdata
docker pull cheinisch/lensfolio:latest
docker compose up -d
Nginx
docker compose down
docker volume rm appdata
docker pull cheinisch/lensfolio-php:latest
docker pull cheinisch/lensfolio-nginx:latest
docker compose up -d
Summary
Application code is updated cleanly by replacing the appdata volume.
User uploads and dynamic content remain safe.
Minimal downtime during the update process.
After following this guide, your Lensfolio system will be updated and fully operational again!
- Previous
- Docker installation