forked from striezel/plotly-node-export-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
30 lines (29 loc) · 1.19 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
FROM debian:12-slim
MAINTAINER Dirk Stolle <[email protected]>
# Always update package lists and install updates first.
# HTTPS transport for APT is required to get the Node.js packages.
# curl, GnuPG and CA certificates are needed to get the key for the Nodesource
# APT repository.
RUN apt-get update && apt-get upgrade -y && \
apt-get install --no-install-recommends -y \
apt-transport-https \
curl \
gnupg2 \
dirmngr \
ca-certificates \
libfontconfig1
# Node.js is required to run this application.
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN apt-get update && apt-get install nodejs -y
# Create directory for application.
RUN mkdir -p /opt/export-server
# Copy all files to that directory.
COPY export-server /opt/export-server
WORKDIR /opt/export-server
# Install required Node.js packages (basically jsdom).
RUN npm install
# Node.js server runs on port 3000.
EXPOSE 3000
# Start server via NPM.
CMD npm start