-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfileTests
32 lines (28 loc) · 870 Bytes
/
DockerfileTests
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
ARG NODE_VERSION=lts
# multi-stage build
# depender - get production dependencies
FROM node:${NODE_VERSION} as depender
WORKDIR /build/
COPY package-lock.json package.json opentdf-client-*.tgz ./
RUN npm ci
# builder - create-react-app build
FROM depender as builder
WORKDIR /build/
COPY public/ public/
COPY src/ src/
COPY tests/ tests/
COPY tsconfig.json/ .
COPY craco.config.js/ .
RUN npm run build:test
# server - nginx alpine
FROM nginx:stable-alpine as server
COPY --from=builder /build/build /usr/share/nginx/html
COPY nginx-default.conf /etc/nginx/templates/default.conf.template
ENV KEYCLOAK_HOST "http://localhost/keycloak/auth"
ENV KEYCLOAK_CLIENT_ID ""
ENV KEYCLOAK_REALMS "tdf"
ENV ATTRIBUTES_HOST "http://localhost/attributes"
ENV ENTITLEMENTS_HOST "http://localhost/entitlements"
ENV KAS_HOST "http://localhost:8000"
ENV SERVER_BASE_PATH ""
EXPOSE 80