mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
mount: Use Go Modules
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
This commit is contained in:
parent
93df9f736c
commit
af7b87e99a
@ -12,11 +12,11 @@ RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
|||||||
FROM linuxkit/alpine:33063834cf72d563cd8703467836aaa2f2b5a300 AS build
|
FROM linuxkit/alpine:33063834cf72d563cd8703467836aaa2f2b5a300 AS build
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin GO111MODULE=off
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||||
# Hack to work around an issue with go on arm64 requiring gcc
|
# Hack to work around an issue with go on arm64 requiring gcc
|
||||||
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true
|
RUN [ $(uname -m) = aarch64 ] && apk add --no-cache gcc || true
|
||||||
|
|
||||||
COPY *.go /go/src/mountie/
|
COPY . /go/src/mountie
|
||||||
RUN go-compile.sh /go/src/mountie
|
RUN go-compile.sh /go/src/mountie
|
||||||
|
|
||||||
FROM scratch
|
FROM scratch
|
||||||
@ -24,5 +24,5 @@ ENTRYPOINT []
|
|||||||
CMD []
|
CMD []
|
||||||
WORKDIR /
|
WORKDIR /
|
||||||
COPY --from=mirror /out/ /
|
COPY --from=mirror /out/ /
|
||||||
COPY --from=build /go/bin/mountie usr/bin/mountie
|
COPY --from=build /go/bin/mount usr/bin/mountie
|
||||||
CMD ["/usr/bin/mountie"]
|
CMD ["/usr/bin/mountie"]
|
||||||
|
3
pkg/mount/go.mod
Normal file
3
pkg/mount/go.mod
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
module github.com/linuxkit/linuxkit/pkg/mount
|
||||||
|
|
||||||
|
go 1.15
|
Loading…
Reference in New Issue
Block a user