1
0
mirror of https://github.com/rancher/steve.git synced 2025-04-27 11:00:48 +00:00
steve/Dockerfile
2023-08-23 00:42:52 +05:30

15 lines
476 B
Docker

# syntax = docker/dockerfile:experimental
FROM registry.suse.com/bci/golang:1.20 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.5.11.2
COPY --from=build /steve /usr/bin/steve
# Hack to make golang do files,dns search order
ENV LOCALDOMAIN=""
ENTRYPOINT ["/usr/bin/steve"]