mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-06 17:32:26 +00:00
include main.Version in binaries
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
@@ -12,6 +12,8 @@ FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
|||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
|
|
||||||
COPY . /go/src/binfmt/
|
COPY . /go/src/binfmt/
|
||||||
RUN go-compile.sh /go/src/binfmt
|
RUN go-compile.sh /go/src/binfmt
|
||||||
|
@@ -19,6 +19,9 @@ FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 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
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
@@ -21,6 +21,8 @@ RUN apk add --no-cache go musl-dev
|
|||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
|
|
||||||
COPY . /go/src/format/
|
COPY . /go/src/format/
|
||||||
RUN go-compile.sh /go/src/format
|
RUN go-compile.sh /go/src/format
|
||||||
|
@@ -2,6 +2,8 @@ FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
|||||||
|
|
||||||
RUN apk add --no-cache go musl-dev git
|
RUN apk add --no-cache go musl-dev git
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
|
|
||||||
COPY . /go/src/host-timesync-daemon
|
COPY . /go/src/host-timesync-daemon
|
||||||
RUN go-compile.sh /go/src/host-timesync-daemon
|
RUN go-compile.sh /go/src/host-timesync-daemon
|
||||||
|
@@ -7,6 +7,9 @@ RUN LDFLAGS=-static CFLAGS=-Werror make usermode-helper
|
|||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
ENV GOPATH=/go PATH=$PATH:/go/bin
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
|
@@ -1,7 +1,10 @@
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev linux-headers
|
RUN apk add --no-cache go musl-dev linux-headers
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
|
||||||
|
@@ -1,7 +1,10 @@
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS build
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS build
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS build
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS build
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev linux-headers
|
RUN apk add --no-cache go musl-dev linux-headers
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin GO111MODULE=off
|
ENV GOPATH=/go PATH=$PATH:/go/bin GO111MODULE=off
|
||||||
# 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
|
||||||
|
@@ -12,6 +12,8 @@ RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS build
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS build
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
||||||
|
|
||||||
RUN apk add --no-cache go gcc musl-dev linux-headers
|
RUN apk add --no-cache go gcc musl-dev linux-headers
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
FROM linuxkit/alpine:316c3f9d85c21fdd8bc7479e81d290f85bf60eb0 AS mirror
|
||||||
|
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
@@ -11,6 +11,8 @@ RUN rm -rf /out/etc/apk /out/lib/apk /out/var/cache
|
|||||||
|
|
||||||
# We also need the Go binary which calls it:
|
# We also need the Go binary which calls it:
|
||||||
RUN apk add --no-cache go musl-dev
|
RUN apk add --no-cache go musl-dev
|
||||||
|
ARG GOPKGVERSION
|
||||||
|
ENV ldflags="-X main.Version=$GOPKGVERSION"
|
||||||
ENV GOPATH=/go PATH=$PATH:/go/bin
|
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
|
||||||
|
Reference in New Issue
Block a user