-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.direct
More file actions
27 lines (24 loc) · 1.04 KB
/
Dockerfile.direct
File metadata and controls
27 lines (24 loc) · 1.04 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
# Change the value to ensure that the code generation is rerun
ARG CACHEBUST=1
# The location - relative to inside of the docker image - of the TDR OpenApi Yaml to use
ARG TDR_OPEN_API_YAML_LOCATION=https://jade.datarepo-dev.broadinstitute.org/data-repository-openapi.yaml
## Step 1. Run code generation
FROM openapitools/openapi-generator-cli:v6.2.1 as codegen
ARG CACHEBUST
ARG TDR_OPEN_API_YAML_LOCATION
RUN /usr/local/bin/docker-entrypoint.sh generate -g typescript-axios -i $TDR_OPEN_API_YAML_LOCATION -o /local/src/generated/tdr --skip-validate-spec
## Step 2. Build the deployable UI artifacts
FROM node:20.19.4 as build
# Install git
RUN apt-get update && apt-get install -y --no-install-recommends git
# Copy the local code
COPY . /
# Copy the generated code
COPY --from=codegen /local /
# Run the build
RUN export DISABLE_ESLINT_PLUGIN=true && \
npm ci && \
npm run build-no-code-gen
## Step 3. Copy the static UI artifacts into an nginx image to host
FROM nginxinc/nginx-unprivileged:stable-alpine
COPY --from=build /build /usr/share/nginx/html