Skip to content

Add Dockerfile#59

Open
pferreir wants to merge 1 commit intoThiefMaster:masterfrom
pferreir:add-dockerfile
Open

Add Dockerfile#59
pferreir wants to merge 1 commit intoThiefMaster:masterfrom
pferreir:add-dockerfile

Conversation

@pferreir
Copy link

I think this could be handy to quickly run a server without having to mess with pip.


RUN apk update
RUN apk add apache2-utils bash
RUN python -m venv /maildump
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd create and use an unprivileged users for this, no need to run maildump as root inside the container

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(done)

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good point. It would still run on podman, it just wouldn't be built on it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be fine like this... but maybe it should be tested with docker build. Works fine with podman.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, it works on docker too.

@pferreir pferreir force-pushed the add-dockerfile branch 4 times, most recently from df63508 to 1814fb1 Compare July 25, 2025 15:53
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

Successfully merging this pull request may close these issues.

2 participants