-
Notifications
You must be signed in to change notification settings - Fork 291
/
Dockerfile
32 lines (21 loc) · 899 Bytes
/
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
# syntax=docker/dockerfile:1.3
FROM --platform=$BUILDPLATFORM node:18-alpine as dev
ARG APP_SHELL_VERSION=4.4.1
RUN mkdir -p /app
WORKDIR /app
COPY spa-build-config.json .
ARG CACHE_BUST
RUN npx --legacy-peer-deps openmrs@${APP_SHELL_VERSION:-next} assemble --manifest --mode config --config spa-build-config.json --target ./spa
RUN npx --legacy-peer-deps openmrs@${APP_SHELL_VERSION:-next} build --build-config spa-build-config.json --target ./spa
FROM nginx:1.23-alpine
RUN apk update && \
apk upgrade && \
# add more utils for sponge to support our startup script
apk add --no-cache moreutils
# clear any default files installed by nginx
RUN rm -rf /usr/share/nginx/html/*
COPY startup.sh /usr/local/bin/startup.sh
RUN chmod +x /usr/local/bin/startup.sh
COPY nginx.conf /etc/nginx/nginx.conf
COPY --from=dev /app/spa /usr/share/nginx/html
CMD ["/usr/local/bin/startup.sh"]