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

Running in Swarm mode: Cannot use secrets #185

Open
6 tasks done
riker09 opened this issue May 9, 2018 · 0 comments
Open
6 tasks done

Running in Swarm mode: Cannot use secrets #185

riker09 opened this issue May 9, 2018 · 0 comments

Comments

@riker09
Copy link

riker09 commented May 9, 2018

Expected behavior

  • I want to use the frontend on a Docker Swarm node and manage the certificate details as secrets.

So instead of this:

  frontend:
    image: konradkleine/docker-registry-frontend:v2
    volumes:
      - ./certs/frontend.crt:/etc/apache2/server.crt:ro
      - ./certs/frontend.key:/etc/apache2/server.key:ro

I want to do this:

  frontend:
    image: konradkleine/docker-registry-frontend:v2
    secrets:
      - source: frontend.crt
        target: /etc/apache2/server.crt
        mode: 0440
      - source: frontend.key
        target: /etc/apache2/server.key
        mode: 0440

secrets:
  frontend.crt:
    file: ./certs/frontend.crt
  frontend.key:
    file: ./certs/frontend.key

(I have left out the configs for ports, environment, etc. for brevity)

Actual behavior

  • When using secrets an error is raised during container startup: starting container failed: linux mounts: Duplicate mount point: /etc/apache2/server.crt".

Steps to reproduce the problem

  • Start a registry frontend with the code from the second example above.

Specifications

  • Which version of docker (docker version) are you running?
    Docker version 18.03.1-ce, build 9ee9f40
  • Which operating system do you use?
    Ubuntu 16.04 @ 4.13.0-39-generic
  • Which version of the docker-registry-frontend are you running?
    Git Revision acd3f1f
    konradkleine/docker-registry-frontend v2 60d4b91e68fa 6 months ago 266MB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant