Open jetersen opened 6 years ago
https://github.com/docker/compose/pull/5767#issuecomment-391158566
v3 formats are frozen upon release.
Well that goes against having an experimental feature that was not included in the schema.
any reason it was only added to 2.4? and not 3.5 or 3.6? Which should be in the same version matrix.
@casz one reason for it to not being support in v3 formats is that it is not supported by Swarm Mode, and thus would have no effect on docker stack deploy
ā as v3 formats are mainly driven by stack deploy
, that's a reason why it didn't get added to the v3 version. Also the --platform
flag (on docker run
) is a bit weird : it only targets (and works) with a specific version of the docker daemon, a.k.a windows dockerd with lcow support, lcow being experimental still. It doesn't have any effect or validation on Linux as of now (cc @johnstep @jhowardmsft @mavenugo I really think this is weird as hell).
That being said, I think one easy fix to that issue would be to add platform
to v3 schema(s) ā but it would start at schema 3.7
ā and printing a warning when issuing a docker stack deploy
that this field is not supported (same way we do it for build
). It would allow to more easily updated from v2 to v3 for users and help us not make v2 and v3 schema diverge that much ā at least not having elements in v2 that are not in v3ā¦
cc @thaJeztah @chris-crone @shin- @dnephin
I agree with @vdemeester that current --platform switch implementation is bit weird but anyway I see that it should be included to v3.7 and to stack deploy also (other why it totally useless).
Or make Windows dockerd with LCOW enabled reporting it selves with multiple OS (linux and windows) so it would automatically choose correct platform.
A lot of moving parts, but running parallel architecture images would be great to solve. Windows 20H2 has supports for Hyper-V isolation, and Supports process isolation
I do not want the switch the Docker Desktop engine, run wsl2, and use the docker Linux context. From the Windows console, run hybrid docker-compose, Windows, and Linux context.
cc: @StefanScherer @thaJeztah @simonferquel @nebuk89
Is there any greater impetus to support this now, given that setting the platform is how you instruct Docker for Mac to emulate amd64? (See https://docs.docker.com/docker-for-mac/apple-silicon/#known-issues)
Otherwise, is there some other way we can emulate linux/amd64
on an M1 for a docker service?
@jmalloc Currently debugging the same, looking here suggests it may be in newer version?
https://github.com/docker/compose/pull/5985#issuecomment-683395676
edit: just realised thats docker-compose
and not docker compose
I was able to install the most recent docker-compose
by following instructions here which fixed this for my travis https://docs.docker.com/compose/install/
I tested today, and at least it works in version 3.7. (I am using Docker Compose version 1.29.2.) This page implies that it was added in 3.4, but I have not confirmed that.
It's officially documented here. At the top of the page, there's a note:
The latest and recommended version of the Compose file format is defined by the [Compose Specification (https://github.com/compose-spec/compose-spec/blob/master/spec.md). The Compose spec merges the legacy 2.x and 3.x versions, aggregating properties across these formats and is implemented by Compose 1.27.0+.
Is there any greater impetus to support this now, given that setting the platform is how you instruct Docker for Mac to emulate amd64? (See https://docs.docker.com/docker-for-mac/apple-silicon/#known-issues)
Otherwise, is there some other way we can emulate
linux/amd64
on an M1 for a docker service?
Thats the same question I ask!
Description
Docker compose version 3.6 does not support platform attribute on a service object When running experimental and wanting to use LCOW š I noticed it was added in 2.4 for docker compose https://github.com/docker/compose/pull/5767
which according to the version matrix should be supported by 3.5 and 3.6
Steps to reproduce the issue:
My docker-compose.yml
Describe the results you received:
Describe the results you expected: That platform is supported for a service
Additional information you deem important (e.g. issue happens only occasionally): https://github.com/docker/compose/issues/5953
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.):