From 13e9bedd29a121b3e7de88341d1431d0c205edb7 Mon Sep 17 00:00:00 2001 From: Utkarsh Mani Tripathi Date: Tue, 30 Oct 2018 17:22:09 +0530 Subject: [PATCH] Dockerfile: upgrade docker build env and go This commit fixes the following: 1. Docker has forbidden the older download url so `make` is failing 2. `go get golang.org/x/lint/golint` command fails while running `make` error ``` golang.org/x/tools/go/internal/gcimporter /go/src/golang.org/x/tools/go/internal/gcimporter/bexport.go:212: obj.IsAlias undefined (type *types.TypeName has no field or method IsAlias) ``` Ref: https://github.com/golang/go/issues/28291 So this commit update the url to download docker and dependencies required to run docker (1). It also update the go version which is used to build the binary (2). Signed-off-by: Utkarsh Mani Tripathi --- Dockerfile.dapper | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile.dapper b/Dockerfile.dapper index 109d17c98..2150c2cfa 100644 --- a/Dockerfile.dapper +++ b/Dockerfile.dapper @@ -21,7 +21,7 @@ RUN apt-get update && \ apt-get install -y cmake wget curl git less file \ libglib2.0-dev libkmod-dev libnl-genl-3-dev linux-libc-dev pkg-config psmisc python-tox qemu-utils fuse python-dev \ devscripts debhelper bash-completion librdmacm-dev libibverbs-dev xsltproc docbook-xsl \ - libconfig-general-perl libaio-dev libc6-dev sg3-utils + libconfig-general-perl libaio-dev libc6-dev sg3-utils iptables libltdl7 # needed for ${!var} substitution RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh @@ -29,15 +29,15 @@ RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh # Install Go & tools ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash -RUN wget -O - https://storage.googleapis.com/golang/go1.8.3.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \ - go get github.com/rancher/trash && go get golang.org/x/lint/golint +RUN wget -O - https://storage.googleapis.com/golang/go1.10.3.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \ + go get github.com/rancher/trash && go get -u golang.org/x/lint/golint # Docker -ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \ - DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm \ +ENV DOCKER_URL_amd64=https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_17.03.3~ce-0~ubuntu-xenial_amd64.deb \ + DOCKER_URL_arm=https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/arm64/docker-ce_18.06.1~ce~3-0~ubuntu_arm64.deb \ DOCKER_URL=DOCKER_URL_${ARCH} -RUN wget -O /usr/bin/docker ${!DOCKER_URL} && chmod +x /usr/bin/docker +RUN wget ${!DOCKER_URL} -O docker_ce_${ARCH} && dpkg -i docker_ce_${ARCH} # Minio RUN wget -O /usr/bin/minio https://dl.minio.io/server/minio/release/linux-amd64/archive/minio.RELEASE.2018-05-25T19-49-13Z && chmod +x /usr/bin/minio