-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathDockerfile.unprivileged
More file actions
38 lines (29 loc) · 853 Bytes
/
Dockerfile.unprivileged
File metadata and controls
38 lines (29 loc) · 853 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
FROM golang:1.26 AS build-service
WORKDIR /build
COPY . .
RUN go build -o pdf-turtle
FROM node:lts AS build-playground
WORKDIR /app
COPY .pdf-turtle-playground/. .
RUN npm install
RUN npm run build
FROM chromedp/headless-shell:148.0.7778.56 AS runtime
WORKDIR /app
COPY --from=build-service /build/pdf-turtle /app/pdf-turtle
COPY --from=build-playground /app/dist /app/static-files/extern/playground
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y install ca-certificates fonts-open-sans fonts-roboto fonts-noto-color-emoji && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
ENV LANG=en-US.UTF-8
ENV LOG_LEVEL_DEBUG=false
ENV LOG_JSON_OUTPUT=false
ENV WORKER_INSTANCES=40
ENV PORT=8000
ENV SERVE_PLAYGROUND=true
ENV NO_SANDBOX=true
EXPOSE ${PORT}
RUN useradd -u 64198 app
USER 64198
ENTRYPOINT ["/app/pdf-turtle"]