This repository was archived by the owner on May 6, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ IMAGE_BUILDER = cc-osbuilder
39
39
WORKDIR ?= $(CURDIR ) /workdir
40
40
MK_DIR :=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST ) ) ) )
41
41
OS_BUILDER ?= $(MK_DIR ) /scripts/osbuilder.sh
42
-
42
+ RUNTIME_VERSIONS = "https://raw.githubusercontent.com/clearcontainers/runtime/master/versions.txt"
43
+ # get go_version=<version>
44
+ GO_VERSION = $(shell curl -sL $(RUNTIME_VERSIONS ) | grep '^go_version=' | cut -d= -f2)
45
+ BUILD_GO_VERSION+ = --build-arg GO_VERSION=$(GO_VERSION )
43
46
44
47
# Installation variables
45
48
DESTDIR :=
@@ -109,7 +112,7 @@ kernel-src: $(WORKDIR) $(DOCKER_DEPS)
109
112
110
113
docker-build :
111
114
cd scripts; \
112
- docker build $(BUILD_PROXY ) -t $(IMAGE_BUILDER ) .
115
+ docker build $(BUILD_PROXY ) $( BUILD_GO_VERSION ) -t $(IMAGE_BUILDER ) .
113
116
114
117
clean :
115
118
sudo rm -rf " $( WORKDIR) /rootfs"
Original file line number Diff line number Diff line change 17
17
18
18
From fedora:27
19
19
20
- RUN dnf install -y qemu-img parted gdisk make gcc bc git e2fsprogs go libudev-devel
20
+ RUN dnf install -y qemu-img parted gdisk make gcc bc git e2fsprogs libudev-devel pkgconfig
21
+
22
+ ARG GO_VERSION
23
+
24
+ RUN cd /tmp && curl -OL https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz
25
+ RUN tar -C /usr/ -xzf /tmp/go${GO_VERSION}.linux-amd64.tar.gz
26
+ ENV GOROOT=/usr/go
27
+ ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin
21
28
22
29
ENV workdir /workdir
23
30
WORKDIR ${workdir}
You can’t perform that action at this time.
0 commit comments