-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Description
Description of the issue
I'm using an remote docker daemon (DOCKER_HOST is set). In my docker-compose.yml i have specified some secrets for use in my service. These secrets use a file that is only given on the remote system. Every time i use docker-compose on my local system it shows me a warning, that my service uses an undefined file. For my luck it is just a warning and the service starts and indeed uses the given files from the remote daemon.
Context information (for bug reports)
Output of docker-compose version
docker-compose version 1.27.4, build 40524192
docker-py version: 4.3.1
CPython version: 3.7.7
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
Output of docker version
Client: Docker Engine - Community
Version: 19.03.13
API version: 1.40
Go version: go1.13.15
Git commit: 4484c46d9d
Built: Wed Sep 16 17:02:36 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.10
API version: 1.40 (minimum version 1.12)
Go version: go1.13.3
Git commit: 9424aea
Built: Thu Aug 6 02:55:27 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.10
GitCommit: b34a5c8af56e510852c35414db4c1f4fa6172339
runc:
Version: 1.0.0-rc9
GitCommit: d736ef14f0288d6993a1845745d6756cfc9ddd5a
docker-init:
Version: 0.18.0
GitCommit: fec3683
Output of docker-compose config
(Make sure to add the relevant -f and other flags)
secrets:
my_sec:
file: /path/on/remote/system
services:
my_ser:
container_name: custom
environment:
SOMEENV: foo
image: myimage:latest
ports:
- published: 1234
target: 4321
restart: always
secrets:
- source: my_sec
target: /apps/project/path/in/container
volumes:
- /another/remote/path:/apps/project/path:rw
version: '3.7'
Steps to reproduce the issue
- setup an remote docker daemon, that exposes the daemon port correctly
- install docker-cli and docker-compose locally
- specify DOCKER_HOST to the remote daemon
- configure a local docker-compose.yml file, that includes a configuration for a secret, which uses a file, that only exists on the remote system
- run the compose file
Observed result
i get a warning for the secret file
definition of remote volume works without warning
Expected result
i get a warning when the file is not present on the remote system and the local system should be ignored
Stacktrace / full error message
WARNING: Service "my_ser" uses an undefined secret file "/path/on/remote/system", the following file should be created "/path/on/remote/system"
Additional information
my remote system is a photon-os, my local system is ubuntu18.04 on WSL1
docker and docker-compose installed as documented