thanks a lot for your review strugee! I addressed most of your points in the last commits. One thing to note is that in order to build from the local repository, the Dockerfile et. al. have to live in the root of the repository (
The last open discussion point as far as I can see is the UID and GUID of the
I would like to leave the UID and GUID configurable via a build argument, this is especially useful when running this in production with a host filesystem location mounted as a volume. This would allow you to easily change the file ownerships to a UID/GUID that suits your environment.
Using IDs < 1000 would be a "cleaner" way, yes. I don't see how the current ID hurts though, so we could just leave it at that. It's a bikeshedding point IMO, but if you have any suggestions for a ID < 1000 I will happily change it! :)
Please excuse the huge amount of stupid spelling mistakes and typos in the original PR, it was quite late when I wrote that (UTC+2) . :)
@JanKoppe thanks for updating this! Some points (some of which I made inline too, but ¯_(ツ)_/¯):
Right. I personally wouldn't mind that. I dunno, maybe this isn't the norm in the Docker space (feel free to tell me if that's the case), but I personally feel like if we ship a Dockerfile in-repo I would expect it to build from what's on the local disk, in the same way that if a project ships e.g. a
Definitely wasn't suggesting it shouldn't be a build argument, just that the default should be different.
I don't really feel all that strongly about it, but I figured we might as well play it safe :)
Perhaps 42 could serve as an equally amusing UID? :D
Found a couple small things inline but otherwise this LGTM!
Last thing: if you could rebase on top of
Thanks so much for doing this, and for your patience!
Adds missing graphicsmagick and databank-mongo packages. Also adds a very basic docker-compose configuration.
With this commit the container uses the sources in the current working directory instead of cloning the sources from a remote repository each time. This speeds up builds and ensures that the Dockerfile always uses the currently checked out code.
This patch changes the UID and GUID for the pumpio system user into the system range (< 1000). The installation location for the pump.io source is moved to a local dir instead of the npm installation directory. The datadir directory is prepared and permissions are set so that uploads will work out of the box. For persistence users should use a volume for this location.