-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.deploy
39 lines (30 loc) · 1.08 KB
/
Dockerfile.deploy
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
# Use an official Node.js runtime as a parent image
FROM node:16 AS build
ARG REACT_APP_AUTH0_DOMAIN
ARG REACT_APP_AUTH0_CLIENT_ID
ARG REACT_APP_API_BASE_URL
ARG REACT_APP_TAXII_SWAGGER_URL
ARG REACT_APP_CTIBUTLER_API_SWAGGER_URL
ARG REACT_APP_CTIBUTLET_ADMIN_SWAGGER_URL=
ARG REACT_APP_ADMIN_URL
ARG REACT_APP_TAXII_SWAGGER_URL
ENV REACT_APP_AUTH0_DOMAIN=${REACT_APP_AUTH0_DOMAIN}
ENV REACT_APP_AUTH0_CLIENT_ID=${REACT_APP_AUTH0_CLIENT_ID}
ENV REACT_APP_API_BASE_URL=${REACT_APP_API_BASE_URL}
ENV REACT_APP_TAXII_SWAGGER_URL=${REACT_APP_TAXII_SWAGGER_URL}
ENV REACT_APP_CTIBUTLER_API_SWAGGER_URL=${REACT_APP_CTIBUTLER_API_SWAGGER_URL}
ENV REACT_APP_CTIBUTLET_ADMIN_SWAGGER_URL=${REACT_APP_CTIBUTLET_ADMIN_SWAGGER_URL}
ENV REACT_APP_ADMIN_URL=${REACT_APP_ADMIN_URL}
ENV REACT_APP_TAXII_SWAGGER_URL=${REACT_APP_TAXII_SWAGGER_URL}
# Set the working directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Test env variable
RUN printenv
# Install dependencies
RUN npm install
# Copy the rest of the application code
COPY . .
# # Build the React app
RUN npm run build