do not override a value that has been set by higher-priority environment source
Signed-off-by: Nicolas De Loof [email protected]
ndeloof push compose-spec/compose-go
commit sha: b7069021f4cb8ff5bc9f679b24bab67b3a937abf
push time in 2 days agondeloof issue docker/compose
Description
The documentation is stating:
Values present in the environment at runtime always override those defined inside the .env file. Similarly, values passed via command-line arguments take precedence as well.
Interpolation in .env recently broke with that behaviour and is ignoring precendence of variables in the shell. The behaviour was introduced in V2 and was working in V1 leading to an unnecessary breaking change.
Reference: 9045
Steps to reproduce the issue: Assume a .env of:
VERSION=from_dot_env
IMAGE=foo:${VERSION}
and a compose.yml of:
services:
echo:
image: bash
environment:
IMAGE: ${IMAGE}
command: echo "$IMAGE"
Describe the results you received:
in V2 (using --compatibility does not make any difference):
% VERSION=from_shell docker compose config
name: test
services:
echo:
command:
- bash
- -c
- echo foo:from_dot_env && echo from_shell
environment:
IMAGE: foo:from_dot_env
VERSION: from_shell
image: bash
networks:
default: null
networks:
default:
name: test_default
in V1:
% VERSION=from_shell docker-compose config
services:
echo:
command: bash -c "echo foo:from_shell && echo from_shell"
environment:
IMAGE: foo:from_shell
VERSION: from_shell
image: bash
version: '3.7'
Describe the results you expected:
I expect V2 to also return the same consistent output regarding environment variable precedence as V1 is producing:
% VERSION=from_shell docker-compose config
services:
echo:
command: bash -c "echo foo:from_shell && echo from_shell"
environment:
IMAGE: foo:from_shell
VERSION: from_shell
image: bash
version: '3.7'
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker compose version
:
Docker Compose version v2.4.1
Output of docker info
:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.2)
compose: Docker Compose (Docker Inc., v2.4.1)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 3
Running: 2
Paused: 0
Stopped: 1
Images: 52
Server Version: 20.10.14
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
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 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3df54a852345ae127d1fa3092b95168e4a88e2f8
runc version: v1.0.3-0-gf46b6ba
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 5.10.102.1-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 9.72GiB
Name: docker-desktop
ID: D35Z:TDUA:SCK3:3SYM:BJL6:C3ME:ZB6G:BJ6X:O65Q:IRCD:QYOH:ZTAZ
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 60
Goroutines: 56
System Time: 2022-05-04T15:09:48.264070158Z
EventsListeners: 4
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
Additional environment details:
ndeloof pull request compose-spec/compose-go
assuming we have FOO=BAR by os variable, and dot env file :
FOO=default
BAZ=${FOO}
we expect os env var wins, and also set BAZ
.
For this to happen, loading dot env file MUST NOT replace a variable previously set from os.Env
ndeloof push ndeloof/compose
commit sha: 2da3a4d824aef71e08b93c4901ac2e353ebea778
push time in 2 days agondeloof merge to docker/compose
What I did Add a new workflow to trigger a PR creation on the Docker Documentation repo to update the reference API after each release of Compose
(not mandatory) A picture of a cute animal, if possible in relation with what you did
ndeloof merge to docker/compose
Signed-off-by: Maxime CLEMENT [email protected]
What I did
Prevent event's parent to be swapped for another, since it uses the same ID it would make the prompt to flicker.
Current issue can be seen by using the following compose file :
services:
a:
image: ubuntu:22.10
b:
image: ubuntu:22.10
Note: Use both same large images to make the issue appear longer
Related issue
Fixes #9469
(not mandatory) A picture of a cute animal, if possible in relation with what you did
ndeloof merge to docker/compose
What I did
Add the tags
property to the build
section to define tags that should be applied to the final image, in addition of the one defined with the image
property
(not mandatory) A picture of a cute animal, if possible in relation with what you did
- What I did
Removed truncindex since we can get the same feature using memdb. This removes one of the 3 places we keep containers in memory.
- How I did it
I changed the ID index in memdb so that it can be searched by a prefix. I also converted the truncindex tests to make sure everything is still working as intended. I only converted some of the benchmarks from truncindex, I'm not sure we need the benchmarks for insertion/deletion since those aren't used any more, we are using the same list of containers that are already present in the memdb.
Note: we no longer need patricia
and can remove it, I need help from someone who knows how to do this.
- How to verify it
The CI should be enough.
Benchmarks:
$ go test -benchmem -run=^$ -count 5 -tags linux -bench ^BenchmarkDBGetByPrefix100$ github.com/docker/docker/container
goos: linux
goarch: amd64
pkg: github.com/docker/docker/container
cpu: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
BenchmarkDBGetByPrefix100-6 16018 73935 ns/op 33888 B/op 1100 allocs/op
BenchmarkDBGetByPrefix100-6 16502 73150 ns/op 33888 B/op 1100 allocs/op
BenchmarkDBGetByPrefix100-6 16218 74014 ns/op 33856 B/op 1100 allocs/op
BenchmarkDBGetByPrefix100-6 15733 73370 ns/op 33792 B/op 1100 allocs/op
BenchmarkDBGetByPrefix100-6 16432 72546 ns/op 33744 B/op 1100 allocs/op
PASS
ok github.com/docker/docker/container 9.752s
$ go test -benchmem -run=^$ -count 5 -tags linux -bench ^BenchmarkTruncIndexGet100$ github.com/docker/docker/pkg/truncindex
goos: linux
goarch: amd64
pkg: github.com/docker/docker/pkg/truncindex
cpu: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
BenchmarkTruncIndexGet100-6 16862 73732 ns/op 44776 B/op 1173 allocs/op
BenchmarkTruncIndexGet100-6 16832 73629 ns/op 45184 B/op 1179 allocs/op
BenchmarkTruncIndexGet100-6 17214 73571 ns/op 45160 B/op 1178 allocs/op
BenchmarkTruncIndexGet100-6 16113 71680 ns/op 45360 B/op 1182 allocs/op
BenchmarkTruncIndexGet100-6 16676 71246 ns/op 45056 B/op 1184 allocs/op
PASS
ok github.com/docker/docker/pkg/truncindex 9.759s
$ go test -benchmem -run=^$ -count 5 -tags linux -bench ^BenchmarkDBGetByPrefix500$ github.com/docker/docker/container
goos: linux
goarch: amd64
pkg: github.com/docker/docker/container
cpu: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
BenchmarkDBGetByPrefix500-6 1539 753541 ns/op 169381 B/op 5500 allocs/op
BenchmarkDBGetByPrefix500-6 1624 749975 ns/op 169458 B/op 5500 allocs/op
BenchmarkDBGetByPrefix500-6 1635 761222 ns/op 169298 B/op 5500 allocs/op
BenchmarkDBGetByPrefix500-6 1693 727856 ns/op 169297 B/op 5500 allocs/op
BenchmarkDBGetByPrefix500-6 1874 710813 ns/op 169570 B/op 5500 allocs/op
PASS
ok github.com/docker/docker/container 6.711s
$ go test -benchmem -run=^$ -count 5 -tags linux -bench ^BenchmarkTruncIndexGet500$ github.com/docker/docker/pkg/truncindex
goos: linux
goarch: amd64
pkg: github.com/docker/docker/pkg/truncindex
cpu: Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
BenchmarkTruncIndexGet500-6 1934 780328 ns/op 224073 B/op 5929 allocs/op
BenchmarkTruncIndexGet500-6 1713 713935 ns/op 225011 B/op 5937 allocs/op
BenchmarkTruncIndexGet500-6 1780 702847 ns/op 224090 B/op 5943 allocs/op
BenchmarkTruncIndexGet500-6 1736 711086 ns/op 224027 B/op 5929 allocs/op
BenchmarkTruncIndexGet500-6 2448 508694 ns/op 222322 B/op 5914 allocs/op
PASS
ok github.com/docker/docker/pkg/truncindex 6.877s
- A picture of a cute animal (not mandatory but encouraged)
ndeloof issue comment moby/moby
https://github.com/moby/moby/blob/master/api/types/mount/mount.go#L113-L126 needs to be updated to support tmpfs mode.
I use docker compose. While this can be defined now in the compose spec thanks to @ndeloof (see: https://github.com/compose-spec/compose-spec/issues/176#issuecomment-1112935833) the docker engine API needs to be updated accordingly for this to work.
we can define those in the compose spec
those are not (yet) defined in the spec :P anyway, makes sense to me we expose this in engine API
ndeloof pull request docker/compose
What I did ensure we only attach to services defined by project with applied profiles if we don't, we will attach to all containers created with project label, which might match disabled profiles
Related issue close https://github.com/docker/compose/issues/9286
(not mandatory) A picture of a cute animal, if possible in relation with what you did
ndeloof wants to merge docker/compose
… to the container process
What I did
Use the AdaptCmd when executing run
command and correctly intercept and propagate syscall to the container
Related issue Internal support ticket
(not mandatory) A picture of a cute animal, if possible in relation with what you did
I don't understand how this can offer the suggested fix, as Adapt
just executes AdaptCmd
, could you please elaborate?
ndeloof merge to docker/compose
… to the container process
What I did
Use the AdaptCmd when executing run
command and correctly intercept and propagate syscall to the container
Related issue Internal support ticket
(not mandatory) A picture of a cute animal, if possible in relation with what you did
ndeloof issue comment docker/compose
Hello, when I run docker compose up
I get the following errors :
$ docker-compose up -d
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 950, in send
self.connect()
File "/usr/lib/python3.8/site-packages/docker/transport/unixconn.py", line 43, in connect
sock.connect(self.unix_socket)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 726, in urlopen
retries = retries.increment(
File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 403, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3.8/site-packages/urllib3/packages/six.py", line 734, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 670, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 392, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/client.py", line 1255, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1301, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1250, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1010, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 950, in send
self.connect()
File "/usr/lib/python3.8/site-packages/docker/transport/unixconn.py", line 43, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 205, in _retrieve_server_version
return self.version(api_version=False)["ApiVersion"]
File "/usr/lib/python3.8/site-packages/docker/api/daemon.py", line 181, in version
return self._result(self._get(url), json=True)
File "/usr/lib/python3.8/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 228, in _get
return self.get(url, **self._set_request_timeout(kwargs))
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 530, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 643, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.27.4', 'console_scripts', 'docker-compose')())
File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 67, in main
command()
File "/usr/lib/python3.8/site-packages/compose/cli/main.py", line 123, in perform_command
project = project_from_options('.', options)
File "/usr/lib/python3.8/site-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
File "/usr/lib/python3.8/site-packages/compose/cli/command.py", line 131, in get_project
client = get_client(
File "/usr/lib/python3.8/site-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
File "/usr/lib/python3.8/site-packages/compose/cli/docker_client.py", line 170, in docker_client
client = APIClient(**kwargs)
File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 188, in __init__
self._version = self._retrieve_server_version()
File "/usr/lib/python3.8/site-packages/docker/api/client.py", line 212, in _retrieve_server_version
raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
It seems that some files ares missing? But I don't know which one.
OS : Linux Manjaro
$ docker -v
Docker version 19.03.12-ce, build 48a66213fe
$ docker-compose version
docker-compose version 1.27.4, build unknown
docker-py version: 4.3.1
CPython version: 3.8.5
OpenSSL version: OpenSSL 1.1.1h 22 Sep 2020
I tried by installing compose via pacman, pip, or by taking directly the binary via curl. It seems that all the needed dependencies are installed, exemple by installing with pip:
$ pip install docker-compose
Defaulting to user installation because normal site-packages is not writeable
Collecting docker-compose
Downloading docker_compose-1.27.4-py2.py3-none-any.whl (110 kB)
|████████████████████████████████| 110 kB 2.8 MB/s
Requirement already satisfied: cached-property<2,>=1.2.0 in /usr/lib/python3.8/site-packages (from docker-compose) (1.5.2)
Requirement already satisfied: PyYAML<6,>=3.10 in /usr/lib/python3.8/site-packages (from docker-compose) (5.3.1)
Requirement already satisfied: docopt<1,>=0.6.1 in /usr/lib/python3.8/site-packages (from docker-compose) (0.6.2)
Requirement already satisfied: requests<3,>=2.20.0 in /usr/lib/python3.8/site-packages (from docker-compose) (2.24.0)
Requirement already satisfied: docker[ssh]<5,>=4.3.1 in /usr/lib/python3.8/site-packages (from docker-compose) (4.3.1)
Requirement already satisfied: python-dotenv<1,>=0.13.0 in /usr/lib/python3.8/site-packages (from docker-compose) (0.14.0)
Requirement already satisfied: dockerpty<1,>=0.4.1 in /usr/lib/python3.8/site-packages (from docker-compose) (0.4.1)
Requirement already satisfied: jsonschema<4,>=2.5.1 in /usr/lib/python3.8/site-packages (from docker-compose) (3.2.0)
Requirement already satisfied: texttable<2,>=0.9.0 in /usr/lib/python3.8/site-packages (from docker-compose) (1.6.3)
Requirement already satisfied: distro<2,>=1.5.0 in /usr/lib/python3.8/site-packages (from docker-compose) (1.5.0)
Requirement already satisfied: websocket-client<1,>=0.32.0 in /usr/lib/python3.8/site-packages (from docker-compose) (0.57.0)
Requirement already satisfied: chardet>=3.0.2 in /usr/lib/python3.8/site-packages (from requests<3,>=2.20.0->docker-compose) (3.0.4)
Requirement already satisfied: idna>=2.5 in /usr/lib/python3.8/site-packages (from requests<3,>=2.20.0->docker-compose) (2.10)
Requirement already satisfied: urllib3>=1.21.1 in /usr/lib/python3.8/site-packages (from requests<3,>=2.20.0->docker-compose) (1.25.10)
Requirement already satisfied: six>=1.4.0 in /usr/lib/python3.8/site-packages (from docker[ssh]<5,>=4.3.1->docker-compose) (1.15.0)
Requirement already satisfied: paramiko>=2.4.2 in /usr/lib/python3.8/site-packages (from docker[ssh]<5,>=4.3.1->docker-compose) (2.7.2)
Requirement already satisfied: attrs>=17.4.0 in /usr/lib/python3.8/site-packages (from jsonschema<4,>=2.5.1->docker-compose) (20.2.0)
Requirement already satisfied: pyrsistent>=0.14.0 in /usr/lib/python3.8/site-packages (from jsonschema<4,>=2.5.1->docker-compose) (0.17.3)
Requirement already satisfied: setuptools in /usr/lib/python3.8/site-packages (from jsonschema<4,>=2.5.1->docker-compose) (50.3.0)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/lib/python3.8/site-packages (from paramiko>=2.4.2->docker[ssh]<5,>=4.3.1->docker-compose) (3.2.0)
Requirement already satisfied: cryptography>=2.5 in /usr/lib/python3.8/site-packages (from paramiko>=2.4.2->docker[ssh]<5,>=4.3.1->docker-compose) (3.1.1)
Requirement already satisfied: pynacl>=1.0.1 in /usr/lib/python3.8/site-packages (from paramiko>=2.4.2->docker[ssh]<5,>=4.3.1->docker-compose) (1.4.0)
Requirement already satisfied: cffi>=1.1 in /usr/lib/python3.8/site-packages (from bcrypt>=3.1.3->paramiko>=2.4.2->docker[ssh]<5,>=4.3.1->docker-compose) (1.14.3)
Requirement already satisfied: pycparser in /usr/lib/python3.8/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko>=2.4.2->docker[ssh]<5,>=4.3.1->docker-compose) (2.20)
Installing collected packages: docker-compose
Successfully installed docker-compose-1.27.4
Thanks for your help.
Compose v1 entered the End of Life process, you should switch to compose v2
ndeloof push docker/compose
commit sha: 7ee7becd016268279ce99a0cc3764d7ce64848a2
push time in 3 days agondeloof pull request docker/compose
What I did Fix the TestLocalComposeUp which failed locally
(not mandatory) A picture of a cute animal, if possible in relation with what you did
ndeloof merge to docker/compose
What I did Fix the TestLocalComposeUp which failed locally
(not mandatory) A picture of a cute animal, if possible in relation with what you did
ndeloof push ndeloof/docker
commit sha: 304fbf080465e7097a6ab16b1f2a540d02bc7d75
push time in 3 days agondeloof push ndeloof/compose-spec
commit sha: c03896a2f9236353e1751678b842d9295d754a56
push time in 3 days agondeloof pull request compose-spec/compose-go
ndeloof push ndeloof/compose-spec
commit sha: 054e3b1f0ec54bc7fd37a9d08adc445fbcaa36e5
push time in 4 days agondeloof pull request compose-spec/compose-go
ndeloof issue comment docker/compose
Description
The documentation is stating:
Values present in the environment at runtime always override those defined inside the .env file. Similarly, values passed via command-line arguments take precedence as well.
Interpolation in .env recently broke with that behaviour and is ignoring precendence of variables in the shell. The behaviour was introduced in V2 and was working in V1 leading to an unnecessary breaking change.
Reference: 9045
Steps to reproduce the issue: Assume a .env of:
VERSION=from_dot_env
IMAGE=foo:${VERSION}
and a compose.yml of:
services:
echo:
image: bash
environment:
IMAGE: ${IMAGE}
command: echo "$IMAGE"
Describe the results you received:
in V2 (using --compatibility does not make any difference):
% VERSION=from_shell docker compose config
name: test
services:
echo:
command:
- bash
- -c
- echo foo:from_dot_env && echo from_shell
environment:
IMAGE: foo:from_dot_env
VERSION: from_shell
image: bash
networks:
default: null
networks:
default:
name: test_default
in V1:
% VERSION=from_shell docker-compose config
services:
echo:
command: bash -c "echo foo:from_shell && echo from_shell"
environment:
IMAGE: foo:from_shell
VERSION: from_shell
image: bash
version: '3.7'
Describe the results you expected:
I expect V2 to also return the same consistent output regarding environment variable precedence as V1 is producing:
% VERSION=from_shell docker-compose config
services:
echo:
command: bash -c "echo foo:from_shell && echo from_shell"
environment:
IMAGE: foo:from_shell
VERSION: from_shell
image: bash
version: '3.7'
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker compose version
:
Docker Compose version v2.4.1
Output of docker info
:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.2)
compose: Docker Compose (Docker Inc., v2.4.1)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.17.0)
Server:
Containers: 3
Running: 2
Paused: 0
Stopped: 1
Images: 52
Server Version: 20.10.14
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
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 io.containerd.runtime.v1.linux runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 3df54a852345ae127d1fa3092b95168e4a88e2f8
runc version: v1.0.3-0-gf46b6ba
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 5.10.102.1-microsoft-standard-WSL2
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 9.72GiB
Name: docker-desktop
ID: D35Z:TDUA:SCK3:3SYM:BJL6:C3ME:ZB6G:BJ6X:O65Q:IRCD:QYOH:ZTAZ
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 60
Goroutines: 56
System Time: 2022-05-04T15:09:48.264070158Z
EventsListeners: 4
HTTP Proxy: http.docker.internal:3128
HTTPS Proxy: http.docker.internal:3128
No Proxy: hubproxy.docker.internal
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
hubproxy.docker.internal:5000
127.0.0.0/8
Live Restore Enabled: false
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support
Additional environment details:
@tboddyspargo indeed, my fix is incomplete, sorry for this
ndeloof push docker/cli
commit sha: 0e4dde2487410da2d17a444be7b7af0d83375a5b
push time in 4 days ago
[proposal] delegate `build` execution to `buildx bake`
Description buildx is used as a vendored dependency to implement
compose build
command. With lack of a minimal "build" API/SDK, we have to copy/paste some significant amount of code, and to adjust this code to follow updates on buildx development. So we basically are always late to adopt new features.On the other hand,
buildx
evolves quickly and introduce many new features which are initially available through thebake
command using dedicated HCL syntax. While compose.yaml format is also supported, I don't expect bake to always be up-to-date with the compose specification, and especially being able to introduce new build syntax in the compose-specification would require cross repositories PR which makes our maintenance effort heavier.My proposal is to re-implement
compose build
by delegating execution tobuildx bake
command, generating abake.hcl
configuration file with everything needed based on the compose model, build flags, and specific build conditions (images to (re)build, etc).This will enforce we get the best of buildx always available to implement
compose build
, and also defines a clean separation of responsibilities so the buildx maintainers can focus on buildx core features, making builds faster and/or more flexible, while we iterate on the compose syntax and UX.Additional environment details: This proposal comes after discussions on https://github.com/docker/compose/pull/9466#discussion_r874438992