-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
45 lines (35 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
45 lines (35 loc) · 1.13 KB
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
# Multistage build process for compiling our React app.
# DO NOT REMOVE THIS LINE: USES_MULTISTAGE_DOCKER
###################################
## Build Variables ################
###################################
ARG CI_REGISTRY
ARG NGINX_CONTAINER
ARG NODE_CONTAINER_IMAGE
ARG NODE_CONTAINER_TAG
ARG STORE_URL
ARG YARN_OPTS
ARG PUBLIC_URL
ARG REACT_APP_BASE_URL
###################################
## Base container #################
###################################
FROM ${CI_REGISTRY}/shared-services/docker-images/${NODE_CONTAINER_IMAGE}:${NODE_CONTAINER_TAG}
RUN mkdir /app
COPY . /app
WORKDIR /app/src
RUN yarn ${YARN_OPTS} \
&& yarn workspace web build
###################################
## Run unit tests #################
###################################
RUN ls /app/src/packages/web/build/
###################################
## Compile into NginX container ###
###################################
FROM ${CI_REGISTRY}/shared-services/docker-images/nginx:${NGINX_CONTAINER}
ARG TAG
ENV APP_VERSION=${TAG}
COPY --from=0 /app/src/packages/web/build/ /usr/share/nginx/html/
RUN ls /usr/share/nginx/html/
CMD ["/init-with-config.sh"]