sxctl
Details
Source
FROM scratch AS build
ARG VERSION
COPY --from=stagex/core-busybox . /
COPY --from=stagex/core-go . /
ADD fetch/sxctl-${VERSION}.tar.gz .
WORKDIR /sxctl/cmd/sxctl
RUN go get ./...
RUN --network=none <<-EOF
go build -o sxctl
mkdir /rootfs/
cp /sxctl/cmd/sxctl/sxctl /rootfs/
EOF
FROM stagex/core-filesystem AS package
COPY --from=build /rootfs/ /
ENTRYPOINT ["/sxctl"]