-
-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (28 loc) · 1.03 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (28 loc) · 1.03 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 docker.io/library/golang:1.26.4-alpine@sha256:f1ddd9fe14fffc091dd98cb4bfa999f32c5fc77d2f2305ea9f0e2595c5437c14 AS builder
COPY --from=ghcr.io/luzifer-docker/pnpm:v11.6.0@sha256:35e88c1f9f846eeaf811e7db09f2332216025620afa449760b787eaa0bfd5827 . /
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.6' \
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"]