-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
39 lines (29 loc) · 1.28 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
30
31
32
33
34
35
36
37
38
39
FROM node:16-alpine as build
# Set workplace directory
WORKDIR /usr/src/app
# Copy code
COPY . .
# Install dependencies
RUN npm install
# Set new stage
FROM node:16-alpine
# Set workplace directory
WORKDIR /usr/src/app
# Copy files from build stage into container
COPY --from=build /usr/src/app .
# Install tini
RUN apk add --no-cache tini
# Install bash (Needed for correct sed substitution)
RUN apk add --no-cache bash
# Install Doppler CLI
RUN set -e; \
apk add --no-cache wget; \
wget --secure-protocol=TLSv1_2 -q -t3 'https://packages.doppler.com/public/cli/rsa.8004D9FF50437357.key' -O /etc/apk/keys/[email protected]; \
echo 'https://packages.doppler.com/public/cli/alpine/any-version/main' | tee -a /etc/apk/repositories; \
apk add --no-cache doppler
# Run on container startup
ENTRYPOINT if [ -n "$SERVER_INGRESS_URL" ]; then \
# If the app is being bundled with the Server app then set the override host \
export DOPPLER_DASHBOARD_URL="https://dashboard-${RELEASE_ENV_ID}.preview.doppler.team"; \
fi && \
tini -- npm run docker