maxking / docker-mailman

Dockerfiles for the Mailman suite.
https://asynchronous.in/docker-mailman/
MIT License
234 stars 104 forks source link

Allow chown failures #86

Open ishitatsuyuki opened 7 years ago

ishitatsuyuki commented 7 years ago

Both mailman-core and mailman-web bails when I mount the configs ro like this:

volumes:
  - ./mailman-extra.cfg:/opt/mailman/mailman-extra.cfg
chown: /opt/mailman/mailman-extra.cfg: Read-only file system
mailman-core exited with code 1

I prefer mounting them because /opt is hard to manage and doesn't scale.

maxking commented 7 years ago

To be able to persist the data, you need to mount something at /opt/mailman/ inside the core container which is writable for the container and something at /opt/mailman-web-data inside the web container.

ou can mount ANY two directories at those locations and things should work as long as they are writable by uid 1000 I guess.

ishitatsuyuki commented 7 years ago

I use named volumes. (And ro configs on top)

maxking commented 7 years ago

Technically, I don't need mailman-extra.cfg to be writable, but I do need /opt/mailman to writable inside core. I might have to investigate more on how to do that, do you have ideas?

ishitatsuyuki commented 7 years ago

I would assume other things to break when it's not writable, so I think chown -f is enough.

maxking commented 7 years ago

Why not break early instead of waiting for the Mailman to break later?

decentral1se commented 3 years ago

Hey folks, I'm running into this as well:

image

Where I template out that mailman-extra.cfg file using Docker swarm configs (read-only files):

    configs:
      - source: mailman_extra_cfg
        target: /opt/mailman/core/mailman-extra.cfg

And this is failing because of the above mentioned chown issue:

https://github.com/maxking/docker-mailman/blob/9409942a316524b30120713b2888fd9c42c233e7/core/docker-entrypoint.sh#L231

Maybe passing -f is enough? Idk maybe a configurable env var?

pgmillon commented 2 years ago

Same issue here, when using docker-mailman in a K8s cluster and mounting mailman-extra.cfg from a config map, there's no way to make it writable. As such, the containers are crash-looping. Either read the extra conf from another location than /opt/mailman (which would make sense IMHO) or support chown failures.

github-actions[bot] commented 1 year ago

This issue has not been updated for more than 1year

pgmillon commented 2 months ago

Closing stale issues doesn't solve the problem, please remove this automation. From my understanding only /opt/mailman/var needs to be writable not the root directory.

maxking commented 2 months ago

if you see the automation close issue that you care about, or if there is a PR attached that I might have missed, please feel free to reopen it.

pgmillon commented 2 months ago

AFAIK you're the only one who can reopen issues, we can only open new ones (which would cause more overhead IMHO).