mirror of https://github.com/pelias/api.git
Browse Source
There were a couple problems with the current dockerfile: * It set the userid of the processes running in the container to 9999, without creating a user with that ID. This leads to confusion and an annoying message when you run an interactive bash session (the shell PS1 would display something like `I have no name!@1438586f786e:~$` * It tried to run `chown` on _all_ code files after running NPM install. This takes a really long time * It did not copy `package.json` and run `npm install` before copying other files. This means even a one line code change causes the image rebuild process to re-run `npm install`, which takes 30 seconds or so Now the image creates and uses a pelias user, sets permissions correctly from the start to avoid `chown`, and only runs `npm install` when it absolutely has to.pull/1096/head
Julian Simioni
7 years ago
1 changed files with 9 additions and 13 deletions
Loading…
Reference in new issue