-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (30 loc) · 748 Bytes
/
Dockerfile
File metadata and controls
40 lines (30 loc) · 748 Bytes
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
ARG DENO_VERSION=2.7.13
ARG UID=10001
# Use the latest Node.js image.
FROM denoland/deno:debian-${DENO_VERSION}
ARG UID
ENV DEBIAN_FRONTEND=noninteractive
# Set the working directory inside the Docker container.
WORKDIR /app
RUN groupadd \
--gid "${UID}" \
--system \
appuser \
&& useradd \
--create-home \
--uid "${UID}" \
--gid "${UID}" \
--no-log-init \
--system \
appuser
# Copy package.json to Docker image.
COPY deno.json ./
# Install Npm dependencies.
RUN deno install
# Run everything after as non-privileged user.
USER appuser
# Copy all other files from the current directory to /app in the container.
COPY . .
EXPOSE 8000
# Command to run the application.
CMD ["deno", "task", "start"]