-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
Description
Description
In the compose.yaml file, I was used to escaping $ with $$. However recently this seems to fail when braces follow.
Steps To Reproduce
compose.yaml:
services:
foo:
build:
context: .
args:
foo: $${bar}Dockerfile:
FROM debian
ARG foo
RUN echo foo is $fooExecuting
docker compose --progress=plain buildfails with
WARNING: The "bar" variable is not set. Defaulting to a blank string.
-.json:18,19-22: Unknown variable; There is no variable named "bar"., and 1 other diagnostic(s)
Please note that
- removing the braces succeeds
- using plain docker with
docker build --build-arg 'foo=${bar}' --progress=plain .succeeds
Compose Version
Docker version 28.4.0, build d8eb465
Docker Environment
Client: Docker Engine - Community
Version: 28.4.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.29.0
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.39.4
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 33
Running: 3
Paused: 0
Stopped: 30
Images: 336
Server Version: 28.4.0
Storage Driver: overlay2
Backing Filesystem: btrfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
CDI spec directories:
/etc/cdi
/var/run/cdi
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: b98a3aace656320842a23f4a392a33f46af97866
runc version: v1.3.0-0-g4ca628d1
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 6.14.0-29-generic
Operating System: Ubuntu 25.04
OSType: linux
Architecture: x86_64
CPUs: 12
Total Memory: 28.87GiB
Name: [obfuscated]
ID: a1831f45-6602-43f9-8b48-7fa9ae79fbe8
Docker Root Dir: /var/lib/docker
Debug Mode: false
HTTP Proxy: [obfuscated]
HTTPS Proxy: [obfuscated]
No Proxy: [obfuscated]
Experimental: false
Insecure Registries:
::1/128
127.0.0.0/8
Live Restore Enabled: false
Anything else?
- It worked some weeks ago.
- Is it related to [BUG] False "variable is not set" warning when using the ${A:+} interpolation syntax #12637?