forked from stellar/laboratory
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
29 lines (21 loc) · 1.15 KB
/
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
FROM ubuntu:22.04 as build
MAINTAINER SDF Ops Team <[email protected]>
RUN mkdir -p /app
WORKDIR /app
ENV DEBIAN_FRONTEND=noninteractive
# https://create-react-app.dev/docs/advanced-configuration/
ENV INLINE_RUNTIME_CHUNK=false
RUN apt-get update && apt-get install --no-install-recommends -y gpg curl git make ca-certificates apt-transport-https && \
curl -sSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key|gpg --dearmor >/etc/apt/trusted.gpg.d/nodesource-key.gpg && \
echo "deb https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg |gpg --dearmor >/etc/apt/trusted.gpg.d/yarnpkg.gpg && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
apt-get update && apt-get install -y nodejs yarn && apt-get clean
COPY . /app/
RUN yarn install
RUN yarn build
FROM nginx:1.17
COPY --from=build /app/build/ /usr/share/nginx/html/
# We're removing /laboratory/ prefix. To allow for transition
# period we'll support /laboratory/ links using rewrites
COPY nginx_default.conf /etc/nginx/conf.d/default.conf