-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (29 loc) · 803 Bytes
/
Copy pathDockerfile
File metadata and controls
36 lines (29 loc) · 803 Bytes
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
# Stage 1
FROM node:15 AS s1
WORKDIR /proco
COPY package.json ./
RUN npm install
COPY . .
ARG RECAPTCHA_KEY
ENV RECAPTCHA_KEY=$RECAPTCHA_KEY
ARG API_MAPBOX_ACCESS_TOKEN
ENV API_MAPBOX_ACCESS_TOKEN=$API_MAPBOX_ACCESS_TOKEN
ARG API_BASE_URL
ENV API_BASE_URL=$API_BASE_URL
RUN yarn build
# Stage 2
FROM nginx:alpine AS s2
# ssh
ENV SSH_PASSWD "root:Docker!"
RUN apt-get update \
&& apt-get install -y --no-install-recommends dialog \
&& apt-get update \
&& apt-get install -y --no-install-recommends openssh-server \
&& echo "$SSH_PASSWD" | chpasswd
COPY sshd_config /etc/ssh/
# add built frontend
RUN rm -rf /usr/share/nginx/html/*
COPY --from=s1 /proco/build /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY ngx.conf /etc/nginx/nginx.conf
EXPOSE 80 2222