Updating Pi-Hole to 5.1.1 in Docker Compose

I have been running Pi-Hole 5.0 in a docker compose container. I used docker-compose down to remove the container and deleted the folders etc-dnsmasq.d and etc-pihole. Reviewed my docker-compose.yml file and ran docker-compose up to build a fresh container. I was expecting to see Pi-Hole latest version of 5.1.1.

Results from docker-compose up:
pihole | Pi-hole version is v5.0 (Latest: v5.1.1)
pihole | AdminLTE version is v5.0 (Latest: v5.1)
pihole | FTL version is v5.0 (Latest: v5.1)

Any assistance regarding why I can't update to the latest version would be greatly appreciated.

Thanks

I can't really help you there, but can you post you're old 5.0 docker-compose.yml? I'm running into issues with my compose container. This could at lest help me.

Here is what do with a compose update:

Doing a container update:

Cd to the directory of the yaml file and assuming you are using docker-compose.yaml file
docker-compose pull <-pulls news images from the repository
docker-compose up -d <- should recreate the container with the new images
docker image prune <-remove old image files

Thanks - below is the docker-compose.yml - version 3. The only thing I modified is the time zone. This seems to be the one posted on GitHub. Below that are the steps I used to create the Docker environment on a RPi 3B+:

version: "3"

# More info at https://github.com/pi-hole/docker-pi-hole/ and https://docs.pi-hole.net/
services:
  pihole:
    container_name: pihole
    image: pihole/pihole:latest
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "67:67/udp"
      - "80:80/tcp"
      - "443:443/tcp"
    environment:
      TZ: 'America/New_York'
      # WEBPASSWORD: 'set a secure password here or it will be random'
    # Volumes store your data between container upgrades
    volumes:
      - './etc-pihole/:/etc/pihole/'
      - './etc-dnsmasq.d/:/etc/dnsmasq.d/'
    dns:
      - 127.0.0.1
      - 1.1.1.1
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN
    restart: unless-stopped
  1. Install Docker: Install Docker Engine on Debian | Docker Documentation
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh
$ sudo usermod -aG docker your-user
Password: 
  1. Install Docker Compose:
    docker-compose command not working on Raspberry Pi OS 2020.05.27 (Do not use the Docker website for installing docker-compose.)
$ sudo pip3 install docker-compose
  1. Create file for docker-compose.yml

$ docker-compose up

Awesome - thanks RonV42. That worked. Learning something new everyday. Issue resolved.

Kind regards

1 Like