-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (25 loc) · 870 Bytes
/
Dockerfile
File metadata and controls
37 lines (25 loc) · 870 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
ARG GOLANG_IMAGE=golang
ARG GOLANG_VERSION=1.23.6-alpine3.21
ARG APP=narra
FROM --platform=$BUILDPLATFORM ${GOLANG_IMAGE}:${GOLANG_VERSION} AS build
ARG APP
ARG GOPROXY TARGETOS TARGETARCH
RUN apk add --no-cache curl git make jq bash openssl
COPY . /src/$APP
WORKDIR /src/$APP
RUN --mount=type=cache,id=gobuild,target=/root/.cache/go-build \
--mount=type=cache,id=gomod,target=/go/pkg \
make build-standalone
FROM scratch
LABEL \
org.opencontainers.image.title="narra" \
org.opencontainers.image.description="Nginx Auth_Request (and traefik forwardauth) via Remote API" \
org.opencontainers.image.authors="lekovr+dopos@gmail.com" \
org.opencontainers.image.licenses="MIT"
WORKDIR /
ARG APP
COPY --from=build /src/$APP/$APP /app
# Need for SSL
COPY --from=0 /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
EXPOSE 8080
ENTRYPOINT [ "/app" ]