-
-
Notifications
You must be signed in to change notification settings - Fork 100
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 1.01 KB
/
Dockerfile
File metadata and controls
39 lines (28 loc) · 1.01 KB
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 golang:1.26-alpine@sha256:c2a1f7b2095d046ae14b286b18413a05bb82c9bca9b25fe7ff5efef0f0826166 AS builder
COPY --from=ghcr.io/luzifer-docker/pnpm:v10.33.0@sha256:37421bf6d0c9bb40c8fc3471b2ed1f2e7947b4668692713c7db8877feb840d8a . /
ENV CGO_ENABLED=0 \
GOPATH=/go \
NODE_ENV=production
COPY . /src/ots
WORKDIR /src/ots
RUN set -ex \
&& apk --no-cache add \
curl \
git \
make \
nodejs-current \
npm \
tar \
unzip \
&& make build-local
FROM scratch
LABEL org.opencontainers.image.authors='Knut Ahlers <knut@ahlers.me>' \
org.opencontainers.image.version='1.21.4' \
org.opencontainers.image.url='https://github.com/Luzifer/ots/pkgs/container/ots' \
org.opencontainers.image.documentation='https://github.com/Luzifer/ots/wiki' \
org.opencontainers.image.source='https://github.com/Luzifer/ots' \
org.opencontainers.image.licenses='Apache-2.0'
COPY --from=builder /src/ots/ots /usr/local/bin/ots
EXPOSE 3000
USER 1000:1000
ENTRYPOINT ["/usr/local/bin/ots"]