Last active
January 4, 2018 02:56
-
-
Save f440/4a5e7205fd5d8fd1e794a4a552342825 to your computer and use it in GitHub Desktop.
use_node doesn't work at all #319 https://github.com/direnv/direnv/issues/319
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
RUN apt-get update \ | |
&& apt-get install -y git curl | |
# RUN apt-get install -y curl | |
RUN curl -o - https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash | |
RUN curl -L -o direnv https://github.com/direnv/direnv/releases/download/v2.14.0/direnv.linux-amd64 | |
RUN install direnv /usr/local/bin/ | |
RUN echo 'eval "$(direnv hook bash)"' >> ~/.bashrc | |
RUN . ~/.bashrc && nvm install 8.9.1 | |
SHELL ["/bin/bash", "-l", "-c"] | |
RUN mkdir -p /app \ | |
&& echo -e '\ | |
set -x\n\ | |
export NODE_VERSIONS=$HOME/.nvm/versions/node/ \n\ | |
export NODE_VERSION_PREFIX=v \n\ | |
use node 8.9.1 \n\ | |
set +x\n' > /app/.envrc | |
RUN cd /app || true \ | |
&& direnv allow | |
CMD cd /app && direnv reload \ | |
&& echo "================================================================" \ | |
&& echo "bash version: $(bash --version)" \ | |
&& echo "================================================================" \ | |
&& echo "node version: $(node --version)" \ | |
&& set \ | |
&& echo "================================================================" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment