Skip to content

Commit

Permalink
Dockerfile: upgrade docker build env and go
Browse files Browse the repository at this point in the history
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: golang/go#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 <utkarshmani1997@gmail.com>
  • Loading branch information
utkarshmani1997 committed Oct 30, 2018
1 parent 1fac5bb commit 13e9bed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@ 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

# 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
Expand Down

0 comments on commit 13e9bed

Please sign in to comment.