Created
February 28, 2017 10:25
-
-
Save gaving/92bedc4456a7d3baf863dab92d4fb244 to your computer and use it in GitHub Desktop.
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 node:wheezy | |
# Secret variable passed from GitLab CI | |
ARG SSH_PRIVATE_KEY | |
# Install build dependencies for gl | |
RUN apt-get update && apt-get install -y build-essential libxi-dev libglu1-mesa-dev libglew-dev | |
# Copy SSH key for cloning private repos | |
RUN mkdir /root/.ssh/ | |
RUN echo "${SSH_PRIVATE_KEY}" > /root/.ssh/id_rsa | |
RUN chmod 600 /root/.ssh/id_rsa | |
RUN ssh-keyscan -t rsa git.spnet.local >> /root/.ssh/known_hosts | |
RUN git config --global url."https://".insteadOf git:// | |
RUN npm config set strict-ssl false | |
RUN npm config set registry http://registry.npmjs.org/ | |
RUN npm config set proxy ${http_proxy} | |
RUN npm config set https-proxy ${http_proxy} | |
# Install yarn (doesn't build with yarn due to gl issues) | |
# RUN npm install [email protected] -g | |
# Create app directory | |
RUN mkdir -p /var/www/nyx | |
WORKDIR /var/www/nyx | |
# Install app dependencies | |
COPY package.json /var/www/nyx | |
RUN npm install | |
# Bundle app source | |
COPY . /var/www/nyx | |
EXPOSE 8000 8001 | |
CMD [ "npm", "run", "dev" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment