github.com/lazyboychen7/engine@v17.12.1-ce-rc2+incompatible/Dockerfile.aarch64 (about) 1 # This file describes the standard way to build Docker on aarch64, using docker 2 # 3 # Usage: 4 # 5 # # Assemble the full dev environment. This is slow the first time. 6 # docker build -t docker -f Dockerfile.aarch64 . 7 # 8 # # Mount your source in an interactive container for quick testing: 9 # docker run -v `pwd`:/go/src/github.com/docker/docker --privileged -i -t docker bash 10 # 11 # # Run the test suite: 12 # docker run --privileged docker hack/make.sh test-unit test-integration test-docker-py 13 # 14 # Note: AppArmor used to mess with privileged mode, but this is no longer 15 # the case. Therefore, you don't have to disable it anymore. 16 # 17 18 FROM arm64v8/debian:stretch 19 20 # allow replacing httpredir or deb mirror 21 ARG APT_MIRROR=deb.debian.org 22 RUN sed -ri "s/(httpredir|deb).debian.org/$APT_MIRROR/g" /etc/apt/sources.list 23 24 # Packaged dependencies 25 RUN apt-get update && apt-get install -y \ 26 apparmor \ 27 apt-utils \ 28 aufs-tools \ 29 automake \ 30 bash-completion \ 31 bsdmainutils \ 32 btrfs-tools \ 33 build-essential \ 34 cmake \ 35 createrepo \ 36 curl \ 37 dpkg-sig \ 38 gcc \ 39 git \ 40 iptables \ 41 jq \ 42 less \ 43 libapparmor-dev \ 44 libcap-dev \ 45 libdevmapper-dev \ 46 libnl-3-dev \ 47 libprotobuf-c0-dev \ 48 libprotobuf-dev \ 49 libseccomp-dev \ 50 libsystemd-dev \ 51 libtool \ 52 libudev-dev \ 53 mercurial \ 54 net-tools \ 55 pkg-config \ 56 protobuf-compiler \ 57 protobuf-c-compiler \ 58 python-backports.ssl-match-hostname \ 59 python-dev \ 60 python-mock \ 61 python-pip \ 62 python-requests \ 63 python-setuptools \ 64 python-websocket \ 65 python-wheel \ 66 tar \ 67 thin-provisioning-tools \ 68 vim \ 69 vim-common \ 70 xfsprogs \ 71 zip \ 72 --no-install-recommends 73 74 # Install Go 75 # IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored 76 ENV GO_VERSION 1.9.4 77 RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-arm64.tar.gz" \ 78 | tar -xzC /usr/local 79 80 ENV PATH /go/bin:/usr/local/go/bin:$PATH 81 ENV GOPATH /go 82 83 # Only install one version of the registry, because old version which support 84 # schema1 manifests is not working on ARM64, we should skip integration-cli 85 # tests for schema1 manifests on ARM64. 86 ENV REGISTRY_COMMIT 47a064d4195a9b56133891bbb13620c3ac83a827 87 RUN set -x \ 88 && export GOPATH="$(mktemp -d)" \ 89 && git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \ 90 && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ 91 && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ 92 go build -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ 93 && rm -rf "$GOPATH" 94 95 # Install notary and notary-server 96 ENV NOTARY_VERSION v0.5.0 97 RUN set -x \ 98 && export GOPATH="$(mktemp -d)" \ 99 && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ 100 && (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION") \ 101 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 102 go build -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \ 103 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 104 go build -o /usr/local/bin/notary github.com/docker/notary/cmd/notary \ 105 && rm -rf "$GOPATH" 106 107 # Get the "docker-py" source so we can run their integration tests 108 ENV DOCKER_PY_COMMIT 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a 109 # To run integration tests docker-pycreds is required. 110 RUN git clone https://github.com/docker/docker-py.git /docker-py \ 111 && cd /docker-py \ 112 && git checkout -q $DOCKER_PY_COMMIT \ 113 && pip install docker-pycreds==0.2.1 \ 114 && pip install -r test-requirements.txt 115 116 # Install yamllint for validating swagger.yaml 117 RUN pip install yamllint==1.5.0 118 119 # Install go-swagger for validating swagger.yaml 120 ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb 121 RUN git clone https://github.com/go-swagger/go-swagger.git /go/src/github.com/go-swagger/go-swagger \ 122 && (cd /go/src/github.com/go-swagger/go-swagger && git checkout -q $GO_SWAGGER_COMMIT) \ 123 && go install -v github.com/go-swagger/go-swagger/cmd/swagger 124 125 # Set user.email so crosbymichael's in-container merge commits go smoothly 126 RUN git config --global user.email 'docker-dummy@example.com' 127 128 # Add an unprivileged user to be used for tests which need it 129 RUN groupadd -r docker 130 RUN useradd --create-home --gid docker unprivilegeduser 131 132 VOLUME /var/lib/docker 133 WORKDIR /go/src/github.com/docker/docker 134 ENV DOCKER_BUILDTAGS apparmor seccomp selinux 135 136 # Let us use a .bashrc file 137 RUN ln -sfv $PWD/.bashrc ~/.bashrc 138 139 # Register Docker's bash completion. 140 RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker 141 142 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling 143 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/ 144 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ 145 aarch64/buildpack-deps:jessie@sha256:107f4a96837ed89c493fc205cd28508ed0b6b680b4bf3e514e9f0fa0f6667b77 \ 146 aarch64/busybox:latest@sha256:5a06b8b2fdf22dd1f4085c6c3efd23ee99af01b2d668d286bc4be6d8baa10efb \ 147 aarch64/debian:jessie@sha256:e6f90b568631705bd5cb27490977378ba762792b38d47c91c4da7a539f63079a \ 148 aarch64/hello-world:latest@sha256:bd1722550b97668b23ede297abf824d4855f4d9f600dab7b4db1a963dae7ec9e 149 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list) 150 151 # Install tomlv, vndr, runc, containerd, tini, docker-proxy 152 # Please edit hack/dockerfile/install-binaries.sh to update them. 153 COPY hack/dockerfile/binaries-commits /tmp/binaries-commits 154 COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh 155 RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter 156 ENV PATH=/usr/local/cli:$PATH 157 158 # Wrap all commands in the "docker-in-docker" script to allow nested containers 159 ENTRYPOINT ["hack/dind"] 160 161 # Options for hack/validate/gometalinter 162 ENV GOMETALINTER_OPTS="--deadline 4m -j2" 163 164 # Upload docker source 165 COPY . /go/src/github.com/docker/docker