forked from jsheen/server
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (30 loc) · 1.03 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#Change "BAR" if you want to trigger changes to ignore cache (while preserving environment cache)
ARG FOO=BAR
# set the base image to Mongo
FROM mongo:4.2.3-bionic
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
&& apt-get install -y curl \
&& apt-get install -y git
# nvm environment variables
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 11.7.0
# install nvm
# https://github.com/creationix/nvm#install-script
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
# install node and npm
RUN source $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION \
&& nvm alias default $NODE_VERSION \
&& nvm use default
# add node and npm to path so the commands are available
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
EXPOSE 3000 3001
ARG FOO
COPY . .
RUN bin/docker_setup.sh
CMD bash /bin/docker_run.sh