How can I update portainer from 1.18 to 1.21.
Please share how your created it in the first place.
Also make sure to have at least one use with admin priviliges other than the admin account - on one of the image updates, the prviligies of our admin user were stripped and we had to manipulate the sqlite databae directly in order to regain permissions.
version: ‘2’
services:
fhem:
restart: always
expose:
- “8083”
- “7072”
- “8383”
ports:
- “8383:8383”
- “8083:8083”
- “7072:7072”
- “8090:8090”
build: fhem
privileged: true
devices:
- "/dev/ttyUSB0:/dev/ttyUSB0"
volumes:
- ./fhem/core/:/opt/fhem/
- /dev/serial/by-id:/dev/serial/by-id
networks:
- fhem-network
depends_on:
- "mysql"
- "mqtt"
- "smartvisu"
homebridge:
restart: always
image: oznu/homebridge
volumes:
- ./homebridge/config.json:/homebridge/config.json
- ./homebridge/package.json:/homebridge/package.json
environment:
- TZ=Europe/Berlin
- PGID=1000
- PUID=1000
network_mode: host
depends_on:
- "fhem"
habridge:
restart: always
build: habridge
network_mode: host
mysql:
restart: always
expose:
- "3306"
- "33060"
ports:
- "3306:3306"
- "33060:33060"
image: mysql/mysql-server:5.7
volumes:
- ./mysql/init.sql:/docker-entrypoint-initdb.d/fhem-init.sql
- ./mysql/data:/var/lib/mysql
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
networks:
- fhem-network
mqtt:
restart: always
expose:
- "1883"
- "9001"
ports:
- "1883:1883"
- "9001:9001"
image: toke/mosquitto
networks:
- fhem-network
volumes:
- ./mqtt/config/:/mqtt/config/
- ./mqtt/log/:/mqtt/log/
- ./mqtt/data/:/mqtt/data/
nodered:
restart: always
expose:
- "1880"
ports:
- "1880:1880"
image: nodered/node-red-docker:0.18.4
volumes:
- ./nodered/data/:/root/data/
networks:
- fhem-network
depends_on:
- "mqtt"
smartvisu:
restart: always
image: foxi352/smartvisu
volumes:
- ./fhem//core/www/smartvisu2.8/:/var/www/html
ports:
- "8082:81"
networks:
- fhem-network
portainer:
restart: always
image: portainer/portainer
volumes:
- ./portainer/:/data
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "9000:9000"
magic_mirror:
restart: always
image: bastilimbach/docker-magicmirror
expose:
- "8080"
ports:
- "8080:8080"
volumes:
- ./magic_mirror/config:/opt/magic_mirror/config \
- ./magic_mirror/modules:/opt/magic_mirror/modules \
- ./magic_mirror/css:/opt/magic_mirror/css/custom.css \
networks:
- fhem-network
alexa:
restart: always
expose:
- "3000"
ports:
- "3000:3000"
image: bananarama/x86-alexa-fhem:latest
volumes:
- ./alexa/config:/config
networks:
- fhem-network
depends_on:
- "fhem"
iobroker:
restart: always
image: buanet/iobroker:latest
volumes:
- /etc/localtime:/etc/localtime:ro
- /root/docker/data/iobroker/iobroker:/opt/iobroker
- /root/docker/data/iobroker/transfer:/tmp
privileged: true
tty: true
ports:
- "8084-8088:8084-8088"
networks:
- fhem-network
Docker compose
networks:
fhem-network:
driver: bridge
If you change the image line to image: portainer/portainer:1.21.0
and perform a docker-compose up -d
only your portainer container should be replaced with a new container based on the new image.
Anyhow, is there a reason that different unrelated services are in the same compose.yml? Since you didn’t specify any tags for most of your images, a docker-compose pull && docker-compose up -d
would result in pulling the current latest image for all those images, which would end up replacing all their existing container instances with new containers based on their new latest image.
At least you should start using specifc tags for each image. This would allow to just change tags for single containers and just make those update with the next docker-compose up -d
execution.
Danke dir ,kann man hier auch Privat schreiben ?
Habe noch paar fragen zu docker komme aus Deutschland.