-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.multiarch
More file actions
40 lines (29 loc) · 1.3 KB
/
Dockerfile.multiarch
File metadata and controls
40 lines (29 loc) · 1.3 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
40
FROM --platform=$BUILDPLATFORM docker.io/golang:1.22@sha256:f43c6f049f04cbbaeb28f0aad3eea15274a7d0a7899a617d0037aec48d7ab010 as build
ARG TARGETOS
ARG TARGETARCH
ADD . /src
WORKDIR /src
RUN make build
FROM docker.io/alpine:3.19@sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b
LABEL maintainer="ownCloud DevOps <devops@owncloud.com>"
LABEL org.opencontainers.image.authors="ownCloud DevOps <devops@owncloud.com>"
LABEL org.opencontainers.image.title="errors"
LABEL org.opencontainers.image.url="https://github.com/owncloud-ops/errors"
LABEL org.opencontainers.image.source="https://github.com/owncloud-ops/errors"
LABEL org.opencontainers.image.documentation="https://github.com/owncloud-ops/errors"
COPY --from=build /src/dist/errors /bin/errors
RUN addgroup -g 1001 -S app && \
adduser -S -D -H -u 1001 -h /opt/app -s /bin/bash -G app -g app app
RUN apk --update add --no-cache ca-certificates && \
apk upgrade --no-cache libcrypto3 libssl3 && \
mkdir -p /opt/app/data && \
chown -R app:app /opt/app && \
chmod 0750 /opt/app/data && \
rm -rf /var/cache/apk/* && \
rm -rf /tmp/*
EXPOSE 8080 8081
USER app
WORKDIR /opt/app
HEALTHCHECK --interval=10s --timeout=5s --start-period=2s --retries=5 CMD ["/bin/errors", "health"]
ENTRYPOINT ["/bin/errors"]
CMD ["server"]