0

I need to deploy old pgAdmin version 4:5.3 on a Docker running on a Mac Book Pro with Apple M1

After installing Rosetta:

$ softwareupdate --install-rosetta

I was able to run the image in docker in emulation mode with option --platform=linux/x86_64

docker run -p 65333:80 \
    -e 'PGADMIN_DEFAULT_EMAIL=me@somewhere.net' \
    -e 'PGADMIN_DEFAULT_PASSWORD=SuperSecret' \
    --platform=linux/x86_64 \
    -d dpage/pgadmin4:5.3

However when I try to run deploy the equivalent stack configuration in Portainer:

version: '3.7'
services:
  database:
    image: dpage/pgadmin4:5.3
    platform: linux/amd64
    environment:
      - PGADMIN_DEFAULT_EMAIL=me@somewhere.net
      - PGADMIN_DEFAULT_PASSWORD=SuperSecret
    ports:
      - 65332:80

Then I get error:

Failure
platform Additional property platform is not allowed

Error screenshot

I am using Portainer CE 2.13.1

As per docker composer documentation attribute platform seems to be correct: https://docs.docker.com/compose/compose-file/#platform

And I have found this approach proposed in other question such as Docker (Apple Silicon/M1 Preview) MySQL "no matching manifest for linux/arm64/v8 in the manifest list entries"

So, I don't know what I am doing wrong and I have run out of ideas.

Please could you help me with this issue.

Thanks in advance!

  • I have validated the docker-compose file by running it with `docker-compose up` and it worked fine. So this seems to be an issue with Portainer CE – Juan Diego Jun 16 '22 at 10:20
  • Actually when I deploy with `docker stack deploy` then I get the same 'Additional property platform is not allowed' error – Juan Diego Jun 16 '22 at 11:15

1 Answers1

0

Looks like this works fine if you use version: '2.4'.

Modified docker-compose file -

version: '2.4'
services:
  database:
    image: dpage/pgadmin4:5.3
    platform: linux/amd64 
    environment:
      - PGADMIN_DEFAULT_EMAIL=me@somewhere.net
      - PGADMIN_DEFAULT_PASSWORD=SuperSecret
    ports:
      - 65332:80
Raja Ravindra
  • 303
  • 2
  • 9