How to update or choose a specific version of phpMyAdmin when using Docker-Compose.yml?

Asked

Viewed 258 times

0

Using the file Docker-Compose.yml to ride my containers, I know I can choose any version for the chosen service, for example: mariadb: or mariadb:10.4. But using the settings for phpMyAdmin, if there is a container on my machine, from an old project, how can I update it and in case if I am going to assemble a new one, how to pull a specific version? I didn’t find anything on the Docker hub in relation to that.

 version: "3"
    services:
      db:
       image: mariadb:latest
       ports:
       - "3306:3306"

      pma:
       image: phpmyadmin/phpmyadmin
       environment:
        PMA_ARBITRARY: 1
        PMA_HOST: db
        PMA_USER: dev
        PMA_PASSWORD: dev123
        PHP_UPLOAD_MAX_FILESIZE: 1G
        PHP_MAX_INPUT_VARS: 1G
       restart: always
       ports:
       - "8001:80"
       volumes:
       - ./src/sessions:/sessions 

2 answers

1


Every image is defined by [Owner]/[repository]:[tag], the library images (official images) do not have Owner.

When we delete the tag, we automatically tell the Docker that we should take the "Latest". So you need to go to the Docker hub, find the right image and look at your tags. You’ll find the tags available like this.

Then just hit your Docker-Compose by placing the tag that matches the version you want.

The only point of attention, is that not necessarily the version you want can be available on the Docker hub. It happens.

  • The funny thing is that it is an official image and has Owner (https://hub.docker.com/r/phpmyadmin/phpmyadmin/). I had asked the question, because it did not pull old version.

  • But exactly what you said, "not necessarily the version you want may be available ".

  • 1

    Official image, are images published by Docker. This repository is from vendor. This is not considered official image (it’s kind of a convention). The official images are here https://hub.docker.com/search?q=&type=image&image_filter=official

0

To the phpMyAdmin, the oldest possible image to be used using Docker to assemble container is that of version 4.6. So for test level or whatever the intention, a previous version image cannot be mounted.

Example of error when trying to mount used tag less than 4.6:

code@Inspiron:~/www/phpmyadmin$ docker-compose up
Pulling pma (phpmyadmin/phpmyadmin:4.5)...
ERROR: manifest for phpmyadmin/phpmyadmin:4.5 not found

code@Inspiron:~/www/phpmyadmin$ docker-compose up
Pulling pma (phpmyadmin/phpmyadmin:4.0.0)...
ERROR: manifest for phpmyadmin/phpmyadmin:4.0.0 not found

code@Inspiron:~/www/phpmyadmin$ docker-compose up
Pulling pma (phpmyadmin/phpmyadmin:3.5.8.2)...
ERROR: manifest for phpmyadmin/phpmyadmin:3.5.8.2 not found

Only from the version 4.6

version: "3"
    services:
      pma:
       image: phpmyadmin/phpmyadmin:4.6
       environment:
        PMA_ARBITRARY: 1
        PMA_HOST: meuhostaqui
        PMA_USER: dev
        PMA_PASSWORD: dev123
        PHP_UPLOAD_MAX_FILESIZE: 1G
        PHP_MAX_INPUT_VARS: 1G
       restart: always
       ports:
       - "8001:80"
       volumes:
       - ./src/sessions:/sessions

Hence the thing works:

code@Inspiron:~/www/phpmyadmin$ docker-compose up
Pulling pma (phpmyadmin/phpmyadmin:4.6)...
4.6: Pulling from phpmyadmin/phpmyadmin
627beaf3eaaf: Pulling fs layer
...

Browser other questions tagged

You are not signed in. Login or sign up in order to post.