forked from erikarenhill/geodnet-headless-console-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (33 loc) · 830 Bytes
/
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
40
41
42
ARG BUILD_FROM
FROM $BUILD_FROM
# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install dependencies
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
nodejs \
npm \
chromium \
ca-certificates \
curl \
gnupg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Create app directory
WORKDIR /usr/src/app
# Copy package files
COPY package*.json ./
# Install app dependencies
RUN npm ci --only=production
# Copy app source
COPY . .
# Set environment variables for Puppeteer
ENV \
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Make scripts executable
RUN chmod a+x /etc/services.d/geodnet-api/run \
&& chmod a+x /etc/services.d/geodnet-api/finish
ENTRYPOINT ["/init"]
CMD []