-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (21 loc) · 843 Bytes
/
Dockerfile
File metadata and controls
28 lines (21 loc) · 843 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
FROM golang:1.24-alpine AS build
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
ARG VERSION="v1.1.3"
RUN go build -v -ldflags="-s -w -X 'apatit/internal/version.Version=${VERSION}'" -o /app/apatit ./cmd/apatit
FROM alpine:3.21
ARG VERSION="latest"
RUN apk add --no-cache ca-certificates
LABEL org.opencontainers.image.title="APATIT (Advanced Ping-Admin Tasks Indicators Transducer)"
LABEL org.opencontainers.image.description="Transducer for Tasks Indicators from https://ping-admin.com/"
LABEL org.opencontainers.image.source="https://github.com/emergingtravel/apatit"
LABEL org.opencontainers.image.version="${VERSION}"
COPY --from=build /app/apatit /usr/local/bin/apatit
WORKDIR /app
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
USER appuser
EXPOSE 8080
ENV LISTEN_ADDRESS=:8080
ENTRYPOINT [ "apatit" ]