Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docker/server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ ARG FIPS_ON=on
ARG ALPINE_VERSION=3.23
ARG GO_VERSION=1.25.5

FROM alpine:${ALPINE_VERSION} AS grpc_health_probe
FROM registry.opensuse.org/opensuse/bci/bci-base-fips:20260106.0-16.10 AS grpc_health_probe

RUN apk add --no-cache curl ca-certificates
RUN zypper --non-interactive install --no-recommends curl ca-certificates

ENV GRPC_HEALTH_PROBE_VERSION=v0.4.43
ENV TARGETOS=linux
Expand All @@ -15,20 +15,20 @@ ENV TARGETARCH=amd64
RUN curl -sfLo /bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-${TARGETOS}-${TARGETARCH} && \
chmod +x /bin/grpc_health_probe

FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder
FROM registry.opensuse.org/opensuse/bci/golang:1.25.5 AS builder

WORKDIR /usr/src/app

COPY go.sum go.mod ./
RUN go mod tidy && go mod verify

COPY . .
RUN GODEBUG=fips140=$FIPS_ON CGO_ENABLED=0 go build -o /bin/server ./cmd/server
RUN CGO_ENABLED=0 go build -o /bin/dino ./cmd/server

FROM gcr.io/distroless/static AS final
FROM registry.opensuse.org/opensuse/bci/bci-micro-fips:20260105.0-10.15

COPY --chown=65532:65532 --chmod=0755 --from=grpc_health_probe /bin/grpc_health_probe /usr/bin/grpc_health_probe
COPY --chown=65532:65532 --chmod=0755 --from=builder /bin/server /usr/bin/server
COPY --chown=65532:65532 --chmod=0755 --from=builder /bin/dino /usr/bin/dino

USER 65532

Expand All @@ -39,5 +39,5 @@ HEALTHCHECK --interval=30s --timeout=10s \

EXPOSE 50051 4242

ENTRYPOINT [ "/usr/bin/server" ]
ENTRYPOINT [ "dino" ]
CMD [ ]
13 changes: 10 additions & 3 deletions docker/tunnel.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,21 @@
ARG ALPINE_VERSION=3.23
ARG GO_VERSION=1.25.5

FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION}
FROM registry.opensuse.org/opensuse/bci/golang:1.25.5 AS builder

WORKDIR /usr/src/app

COPY go.sum go.mod ./
RUN go mod tidy && go mod verify

COPY . .
RUN CGO_ENABLED=0 go build -o /usr/local/bin/tunnel ./cmd/tunnel
RUN CGO_ENABLED=0 go build -o /bin/tunnel ./cmd/tunnel

CMD [ "tunnel" ]
FROM registry.opensuse.org/opensuse/bci/bci-micro-fips:20260105.0-10.15

COPY --chown=65532:65532 --chmod=0755 --from=builder /bin/dino /usr/bin/dino

USER 65532

ENTRYPOINT [ "tunnel" ]
CMD [ ]