-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-web-ecui
48 lines (36 loc) · 1.17 KB
/
Dockerfile-web-ecui
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
# specify the node base image with your desired version node:<version>
FROM node:16
# replace this with your application's default port
EXPOSE 5555
EXPOSE 80
ARG branch=main
ARG ssh_key_path=~/.ssh/id_github
WORKDIR /home
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git
# Make ssh dir
RUN mkdir /root/.ssh/
# Copy over private key, and set permissions
# Warning! Anyone who gets their hands on this image will be able
# to retrieve this private key file from the corresponding image layer
ADD $ssh_key_path /root/.ssh/id_github
RUN echo " IdentityFile /root/.ssh/id_github" >> /etc/ssh/ssh_config
# Create known_hosts
RUN touch /root/.ssh/known_hosts
# Add bitbuckets key
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
# Clone the conf files into the docker container
RUN git clone git@github.com:SpaceTeam/web_ecui_houbolt.git
WORKDIR /home/web_ecui_houbolt
RUN git checkout $branch
RUN git pull
RUN git submodule init
RUN git submodule update
RUN npm install
WORKDIR /home/web_ecui_houbolt/client/pnid_houbolt/
RUN npm install
WORKDIR /home/web_ecui_houbolt
ENV ECUI_CONFIG_PATH=/home/config_ecui
ENTRYPOINT node server