staltz / easy-ssb-pub

An easy-to-host server that runs an SSB "Pub"
GNU Affero General Public License v3.0
209 stars 35 forks source link

Fix nvm installation #27

Closed maackle closed 6 years ago

maackle commented 6 years ago

The only important change here is line 23,ENV NVM_DIR /root/.nvm. The old version, ENV NVM_DIR $HOME/.nvm doesn't work because Docker doesn't recognize $HOME in that context. So, it thinks NVM_DIR is actually /.nvm, which causes that directory to be created and node versions to be installed in there, which messes up the installation.

While I was testing this out I moved libsodium earlier in the Dockerfile because it's the lengthiest step and altering the node install shouldn't re-trigger a libsodium build.

I also unnecessarily bumped up the node version, because why not?

If you want I can get rid of these extraneous changes.

staltz commented 6 years ago

Hi :) Thanks for submitting this PR. Does the /root folder exist always?

maackle commented 6 years ago

I'm not sure. That's why I made that big comment :) I assume so though, as long as the base xenial image stays the same. I wonder if there's a better way?

staltz commented 6 years ago

I believe this is now done in master branch