Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

platform flag unsupported in linux? #4724

Closed
yamenk-gribaudo opened this issue Dec 15, 2023 · 2 comments
Closed

platform flag unsupported in linux? #4724

yamenk-gribaudo opened this issue Dec 15, 2023 · 2 comments

Comments

@yamenk-gribaudo
Copy link

Description

We have a compose file that is shared between developers using mac OS and developers using linux. The thing is we added the platform flag so mac users could use a specific image of mysql (that isnt available for ARM64), and now everytime a linux user try to use the compose file, it fails with error: Unsupported config option for services.mysql: 'platform'. container config:

version: '3.7'
services:
  mysql:
    image: mysql:5.7.37
    platform: linux/arm64
    ...

Reproduce

In a linux machine, use a compose file as the one above and run any command that use the use the file.

Expected behavior

Docker should start the service without a problem.

docker version

Client: Docker Engine - Community
 Version:           24.0.7
 API version:       1.43
 Go version:        go1.20.10
 Git commit:        afdd53b
 Built:             Thu Oct 26 09:08:01 2023
 OS/Arch:           linux/amd64
 Context:           default

Server: Docker Engine - Community
 Engine:
  Version:          24.0.7
  API version:      1.43 (minimum version 1.12)
  Go version:       go1.20.10
  Git commit:       311b9ff
  Built:            Thu Oct 26 09:08:01 2023
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.25
  GitCommit:        d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc:
  Version:          1.1.10
  GitCommit:        v1.1.10-0-g18a0cb0
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.10.5
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 24.0.7
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
 runc version: v1.1.10-0-g18a0cb0
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
 Kernel Version: 5.15.0-89-generic
 Operating System: Ubuntu 20.04.6 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 60.92GiB
 Name: yamenk
 ID: RGF5:C5AQ:IC3Q:EDQM:YJAV:2UKP:FZEZ:D5QF:QJA4:2AWD:6MJE:OS3Y
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: yamenk28
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional Info

docker compose version
Docker Compose version v2.21.0

docker compose file version
3.7

@thaJeztah
Copy link
Member

thaJeztah commented Dec 18, 2023

Are you seeing the same error when using a different image? I wonder if it's producing an error because the mysql:5.7.37 image is not available for arm64 (only amd64 (x64));

docker buildx imagetools inspect mysql:5.7.37
Name:      docker.io/library/mysql:5.7.37
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
Digest:    sha256:151ecb87a07404f2c2588464e86381bdf74795c6d24090f9c50bc8e947a57797

Manifests:
  Name:      docker.io/library/mysql:5.7.37@sha256:1520c2db1591b37fc7f2c0bc72b4e0a002afed6fcc2397f7bcd2bbdff490c930
  MediaType: application/vnd.docker.distribution.manifest.v2+json
  Platform:  linux/amd64

⚠️ also note that MySQL 5.7 reached EOL; docker-library/mysql#971 (comment)

@yamenk-gribaudo
Copy link
Author

yamenk-gribaudo commented Dec 19, 2023

The issue was we were using an abstraction layer on top of docker that was supposed to run commands using docker compose, but seems like one of the commads that was running was using docker-compose. And docker-compose do not support the platfrom option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants