mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-05 17:02:00 +00:00
20 lines
516 B
Docker
20 lines
516 B
Docker
FROM linuxkit/alpine:146f540f25cd92ec8ff0c5b0c98342a9a95e479e AS mirror
|
|
|
|
RUN apk add --no-cache go musl-dev
|
|
ARG GOPKGVERSION
|
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
|
# Hack to work around an issue with go on arm64 requiring gcc
|
|
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true
|
|
|
|
COPY . /go/src/sysfs/
|
|
RUN go-compile.sh /go/src/sysfs
|
|
|
|
FROM scratch
|
|
ENTRYPOINT []
|
|
CMD []
|
|
WORKDIR /
|
|
COPY --from=mirror /go/bin/sysfs /usr/bin/sysfs
|
|
COPY etc/ /etc/
|
|
CMD ["/usr/bin/sysfs"]
|