docker app build --build-arg not passed to docker-compose
dave-yotta opened this issue · 0 comments
Description
I have a dockerfile which takes a build arg (it's an access token). This dockerfile is referenced as the build of a service in docker-compose.yml. running docker-compose build --build-arg PAT=mytoken
builds successfully, but running docker app build --build-arg PAT=mytoken . -t mytag
fails, the docker build has not recieved that build argument:
...
ARG PAT
RUN test -n "$PAT"
...
Steps to reproduce the issue:
- Specify ARG PAT in dockerfile
- use dockerfile in service with build: dockerfile:
- run docker app build with corresponding
--build-arg key=value
argument
Describe the results you received:
argument is not available during docker build; RUN test -n "$PAT"
does fails.
Describe the results you expected:
argument is available during docker build; RUN test -n "$PAT"
does not fail.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version
:
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.40
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:23:10 2020
OS/Arch: windows/amd64
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 19.03.8
API version: 1.40 (minimum version 1.12)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:29:16 2020
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: v1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker app version
:
Version: v0.9.1-beta3
Git commit: 9d2c67f8
OS/Arch: windows/amd64
Output of docker info
:
Client:
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.3.1-tp-docker)
mutagen: Synchronize files with Docker Desktop (Docker Inc., testing)
Server:
Containers: 2
Running: 2
Paused: 0
Stopped: 0
Images: 102
Server Version: 19.03.8
Storage Driver: overlay2
Backing Filesystem: <unknown>
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
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: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.104-microsoft-standard
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 5.805GiB
Name: docker-desktop
ID: MHM2:PV3M:DSEZ:TOMU:VI6W:RXMG:YFQH:6D4Q:QB5E:NBX4:DMQV:UH7G
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 55
Goroutines: 65
System Time: 2020-07-15T12:31:11.0904404Z
EventsListeners: 2
Registry: https://index.docker.io/v1/
Labels:
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
Product License: Community Engine
WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled
Additional environment details (AWS, VirtualBox, physical, etc.):
Windows Home insider build using WSL 2.0 docker backend