1
0
mirror of https://github.com/rancher/steve.git synced 2025-04-28 03:10:32 +00:00
steve/Dockerfile
renovate-rancher[bot] e8cb3e240a
chore(deps): update registry.suse.com/bci/golang docker tag to v1.23 (#426)
Co-authored-by: renovate-rancher[bot] <119870437+renovate-rancher[bot]@users.noreply.github.com>
2025-02-13 10:05:06 -08:00

15 lines
476 B
Docker

# syntax = docker/dockerfile:experimental
FROM registry.suse.com/bci/golang:1.23 as build
COPY go.mod go.sum main.go /src/
COPY pkg /src/pkg/
#RUN --mount=type=cache,target=/root/.cache/go-build \
RUN \
cd /src && \
CGO_ENABLED=0 go build -ldflags "-extldflags -static -s" -o /steve
FROM registry.suse.com/bci/bci-micro:15.6.29.3
COPY --from=build /steve /usr/bin/steve
# Hack to make golang do files,dns search order
ENV LOCALDOMAIN=""
ENTRYPOINT ["/usr/bin/steve"]