3 ms·
Indeed, it is just a wrapper script, but I think the value is not in the `docker run` script, but in the preconfigured images. With a premade list of cli tools
by datastack 5y ago
Indeed, it is just a wrapper script, but I think the value is not in the `docker run` script, but in the preconfigured images.
With a premade list of cli tools, you won't have to figure out which image to use, write your own Dockerfile if there is no official docker image, how to mount the current directory (try that on windows), which extra volumes to mount (for persistence of npx packages, or .aws credentials, for example), and the 'aliases' will be compatible with unix and windows too.
This tool seemed handy to me, as it was basically a packaged version of what I was already doing with many separate bash scripts. I haven't seen those tools you mentioned, but I'll have a look.
- wdfx 5y agoI don't see anything in the code which sets/handles the current uid/gid - how do you prevent every file created by a dockerized wrapped app being owned by root?
- datastack 5y agoThat sounds like an issue. This initial version is made on Windows, and although the commands are all unix-compatible, the unix file-permissions have slipped past, as on Windows docker runs as the current user. Would this be easy to fix? Like, determining the current user id, and setting it when launching the command? Or would the host uid need to be mapped to the docker uid, which might be different for each image?
- oldsj 5y agoYou can pass in the current user’s uid/gid as an environment variable check out linuxserver images for an example https://hub.docker.com/r/linuxserver/unifi-controller https://hub.docker.com/r/linuxserver/unifi-controller
- encryptluks2 5y agoIt is usually better to use --user $(id -u):$(id -g) to do this. You don't really need to pass it as a variable for the most part.
- jaimehrubiks 5y agoThe author needs to add this and then try if everything works as expected (like npm and pip and so on)