Closed frankivo closed 1 year ago
Thanks for your feature request ☺️
I'm really no expert in docker so bare with meh 😇 my assumption would be that these additions should be made somewhere else and this image should be used as a base image.
For simple testing the flatMapping is not super pretty, but okaish for testing.
But the 1001 user comes from the docker plugin right? If not, you might be right :)
It does! But you can disable it if you want
Docker / daemonUserUid := None
I don't really like any of the solutions, but I'm not sure there is a better way 🤷
I had to use this workaround too @frankivo just in order to get something super basic like a ADD http://..
+ chmod +x
working AT ALL. It's really been a time-waster for me figuring why appending to dockerCommands
always ends with some variation on "chmod: changing permissions of ‘/bin/whatever’: Operation not permitted`.
I think it would have be a non-issue if this pitfall was documented and dockerCommands
supported a prepend operator. 😫
Thanks for your feedback @cbrunnkvist albight the frustration. To be honest the DockerPlugin is by far the most complex one and there are a lot of variations in docker version, docker api version, local permission setup and actual docker distribution, which makes this not a trivial thing.
SBT Native Packager has the "batteries included" approach meaning that a default setup should work out of the box. If you have any suggestions for improving the available docker settings feel I'm more than happy to discuss ideas or even better merge pull requests :D
Regarding the documentation: Please open a pull request and add this piece of information where you would have expected it :)
For instance: to add packages to the base image you need to be root.
Worked around this by flatMapping the dockerCommands and inserting an extra item.
Perhaps this could be made somewhat easier/prettyer.