Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected warning when using secrets in Docker Compose on Windows #8233

Closed
chrischu opened this issue Mar 24, 2021 · 12 comments
Closed

Unexpected warning when using secrets in Docker Compose on Windows #8233

chrischu opened this issue Mar 24, 2021 · 12 comments

Comments

@chrischu
Copy link

Description of the issue

I am trying to add secrets to my Windows Docker container via Docker Compose and I got it to work, but now I get a weird warning starting the container:

Context information (for bug reports)

Output of docker-compose version

docker-compose version 1.28.5, build c4eb3a1f
docker-py version: 4.4.4
CPython version: 3.9.0
OpenSSL version: OpenSSL 1.1.1g  21 Apr 2020

Output of docker version

Client: Docker Engine - Community
 Cloud integration: 1.0.9
 Version:           20.10.5
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        55c4c88
 Built:             Tue Mar  2 20:14:53 2021
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          20.10.5
  API version:      1.41 (minimum version 1.24)
  Go version:       go1.13.15
  Git commit:       363e9a8
  Built:            Tue Mar  2 20:26:56 2021
  OS/Arch:          windows/amd64
  Experimental:     false

Output of docker-compose config
(Make sure to add the relevant -f and other flags)

secrets:
  all:
    file: C:\Temp\ComposeSecrets\secrets
services:
  api:
    image: mcr.microsoft.com//dotnet/framework/runtime:4.8-windowsservercore-ltsc2019
    isolation: hyperv
    secrets:
    - source: all
      target: C:\secrets\
version: '3.7'

Steps to reproduce the issue

  1. When using the following Docker Compose file:
    api.yml
version: "3.7"
services:
  api:
    image: api
    secrets:
      - source: all
        target: C:\secrets\ # defines where the secrets will be available in the container
secrets:
  all:
    file: ./secrets/
  1. with the directory structure:
api.yml
secrets/
  secret
  1. and running docker-compose -f api.yml up

Observed result

I get the warning:
image

Expected result

I expected no warning to show up.

Additional information

I tried various other ways to use secrets (e.g. by not specifying a directory, but the path for every secret) but I couldn't get those solutions to work because of the following error messages:
When using

services:
   api:
     ...
   secrets:
      - secret
secrets:
  secret:
    file: ./secrets/secret   
ERROR: for bbea49dbfb24_api  Cannot create container for service api: invalid mount config for type "bind": invalid mount path: '/run/secrets/secret'

and when using

services:
   api:
     ...
   secrets:
      - source: secret
        target: C:/secrets/secret
secrets:
  secret:
    file: ./secrets/secret   
ERROR: for bbea49dbfb24_api  Cannot create container for service api: invalid mount config for type "bind": source path must be a directory

Additional environment details
It's a physical Windows machine with version:
image

@chrischu
Copy link
Author

I moved this issue to this repository after being told that it fits better her (previous issue: moby/moby#42180).

@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 21, 2021
@drauch
Copy link

drauch commented Sep 21, 2021

Uhm, this is still a problem. Are we in the wrong issue tracker for this?

Best regards,
D.R.

@stale
Copy link

stale bot commented Sep 21, 2021

This issue has been automatically marked as not stale anymore due to the recent activity.

@stale
Copy link

stale bot commented Mar 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 30, 2022
@drauch
Copy link

drauch commented Mar 30, 2022

This is still a problem, don't mark issues as stale just because you don't react to them...

@stale
Copy link

stale bot commented Mar 30, 2022

This issue has been automatically marked as not stale anymore due to the recent activity.

@stale stale bot removed the stale label Mar 30, 2022
@stale
Copy link

stale bot commented Nov 2, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Nov 2, 2022
@drauch
Copy link

drauch commented Nov 2, 2022

This is still a problem, don't mark issues as stale just because you don't react to them...

@stale
Copy link

stale bot commented Nov 12, 2022

This issue has been automatically closed because it had not recent activity during the stale period.

@stale stale bot closed this as completed Nov 12, 2022
@drauch
Copy link

drauch commented Nov 12, 2022

This is still a problem, don't mark issues as stale just because you don't react to them...

@fschmied
Copy link

fschmied commented Aug 9, 2023

Probably/maybe fixed through #10819 (#10817).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants