Compose: Missing secrets file creates a directory?

Created on 15 Nov 2017  路  3Comments  路  Source: docker/compose

When docker-compose up with the config below, if the file mypass.txt is missing, docker-compose creates an empty directory mypass.txt. Is that expected behaviour?

version: '3.1'

services:
  app:
    image: alpine
    secrets:
      - mypass

secrets:
  mypass:
    file: ./mypass.txt

macOS 10.13.1
Docker version 17.11.0-ce-rc3, build 5b4af4f
docker-compose version 1.17.0, build ac53b73

aresecrets kincleanup kinquestion

Most helpful comment

It's a somewhat unfortunate side-effect of the way we emulate secrets in docker-compose. Incidentally, it will be fixed by #5363, which will error out instead if the specified file is missing.

All 3 comments

It's a somewhat unfortunate side-effect of the way we emulate secrets in docker-compose. Incidentally, it will be fixed by #5363, which will error out instead if the specified file is missing.

5363 was never merged, which means this may never have been fixed. Consider re-opening?

It was fixed by #5415

Was this page helpful?
0 / 5 - 0 ratings

Related issues

HackerWilson picture HackerWilson  路  3Comments

29e7e280-0d1c-4bba-98fe-f7cd3ca7500a picture 29e7e280-0d1c-4bba-98fe-f7cd3ca7500a  路  3Comments

dazorni picture dazorni  路  3Comments

maltefiala picture maltefiala  路  3Comments

DhairyashilBhosale picture DhairyashilBhosale  路  3Comments