Conversation
|
|
||
| RUN apk update | ||
| RUN apk add apache2-utils bash | ||
| RUN python -m venv /maildump |
There was a problem hiding this comment.
I'd create and use an unprivileged users for this, no need to run maildump as root inside the container
There was a problem hiding this comment.
Ah right. I usually use podman for this sort of stuff, which is fully user space. Not sure if I can make it work with both.
There was a problem hiding this comment.
i.e. I cannot have a Dockerfile do useradd if I want it to run on podman. What I think I could do is to set UID=1000...
There was a problem hiding this comment.
this is just needed for the build, isn't it? so if I publish an image to docker hub / ghcr, you should be able to run it in any case, right?
but indeed, something like USER nobody should be sufficient, because it does not need to write anything (besides the htpasswd file, but you can just put that in a place like /tmp or make the directory world-writable)
There was a problem hiding this comment.
Yeah, good point. It would still run on podman, it just wouldn't be built on it.
There was a problem hiding this comment.
I think it should be fine like this... but maybe it should be tested with docker build. Works fine with podman.
There was a problem hiding this comment.
Confirmed, it works on docker too.
df63508 to
1814fb1
Compare
I think this could be handy to quickly run a server without having to mess with pip.