-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.theia
52 lines (40 loc) · 1.96 KB
/
Dockerfile.theia
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
from ubuntu:18.04
MAINTAINER Tuhin Sharma "tuhinsharma121@gmail.com"
# --------------------------------------------------------------------------------------------------
# install ubuntu essentials
# --------------------------------------------------------------------------------------------------
RUN apt-get update --fix-missing && \
apt-get -y install build-essential && \
apt-get -y install apt-utils && \
apt-get -y install zlib1g-dev && \
apt-get -y install libssl-dev && \
apt-get -y install libbz2-dev && \
apt-get -y install liblzma-dev && \
apt-get -y install wget && \
apt-get -y install curl
# --------------------------------------------------------------------------------------------------
# install python 3.6.8
# --------------------------------------------------------------------------------------------------
ENV NVM_DIR /usr/local/nvm
ENV NODE_VERSION 14.2.0
RUN curl --silent -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.2/install.sh | bash
ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
RUN echo "source $NVM_DIR/nvm.sh && \
nvm install $NODE_VERSION && \
nvm alias default $NODE_VERSION && \
nvm use default" | bash
# --------------------------------------------------------------------------------------------------
# copy src code and scripts into root dir /
# --------------------------------------------------------------------------------------------------
COPY ./src /src
COPY ./package.json /package.json
COPY ./public /public
# --------------------------------------------------------------------------------------------------
# add entrypoint for the container
# --------------------------------------------------------------------------------------------------
RUN npm install
RUN npm install pm2@4.4.0 -g
ADD ./deployment_config/scripts/entrypoint.sh /bin/entrypoint.sh
RUN chmod +x /bin/entrypoint.sh
ENTRYPOINT ["/bin/entrypoint.sh"]