mirror of
https://github.com/fosrl/olm.git
synced 2026-03-26 12:36:47 +00:00
Bumps the minor-updates group with 1 update: docker/library/golang. Updates `docker/library/golang` from 1.25-alpine to 1.26-alpine --- updated-dependencies: - dependency-name: docker/library/golang dependency-version: 1.26-alpine dependency-type: direct:production dependency-group: minor-updates ... Signed-off-by: dependabot[bot] <support@github.com>
32 lines
782 B
Docker
32 lines
782 B
Docker
# FROM golang:1.25-alpine AS builder
|
|
FROM public.ecr.aws/docker/library/golang:1.26-alpine AS builder
|
|
|
|
# Install git and ca-certificates
|
|
RUN apk --no-cache add ca-certificates git tzdata
|
|
|
|
# Set the working directory inside the container
|
|
WORKDIR /app
|
|
|
|
# Copy go mod and sum files
|
|
COPY go.mod go.sum ./
|
|
|
|
# Download all dependencies
|
|
RUN go mod download
|
|
|
|
# Copy the source code into the container
|
|
COPY . .
|
|
|
|
# Build the application
|
|
ARG VERSION=dev
|
|
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w -X main.olmVersion=${VERSION}" -o /olm
|
|
|
|
FROM public.ecr.aws/docker/library/alpine:3.23 AS runner
|
|
|
|
RUN apk --no-cache add ca-certificates tzdata iputils
|
|
|
|
COPY --from=builder /olm /usr/local/bin/
|
|
COPY entrypoint.sh /
|
|
|
|
RUN chmod +x /entrypoint.sh
|
|
ENTRYPOINT ["/entrypoint.sh"]
|
|
CMD ["olm"] |