github.com/rita33cool1/iot-system-gateway@v0.0.0-20200911033302-e65bde238cc5/docker-engine/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 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 pigz \ 56 pkg-config \ 57 protobuf-compiler \ 58 protobuf-c-compiler \ 59 python-backports.ssl-match-hostname \ 60 python-dev \ 61 python-mock \ 62 python-pip \ 63 python-requests \ 64 python-setuptools \ 65 python-websocket \ 66 python-wheel \ 67 tar \ 68 thin-provisioning-tools \ 69 vim \ 70 vim-common \ 71 xfsprogs \ 72 zip \ 73 --no-install-recommends 74 75 # Install Go 76 # IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored 77 ENV GO_VERSION 1.9.5 78 RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-arm64.tar.gz" \ 79 | tar -xzC /usr/local 80 81 ENV PATH /go/bin:/usr/local/go/bin:$PATH 82 ENV GOPATH /go 83 84 # Only install one version of the registry, because old version which support 85 # schema1 manifests is not working on ARM64, we should skip integration-cli 86 # tests for schema1 manifests on ARM64. 87 ENV REGISTRY_COMMIT 47a064d4195a9b56133891bbb13620c3ac83a827 88 RUN set -x \ 89 && export GOPATH="$(mktemp -d)" \ 90 && git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \ 91 && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ 92 && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ 93 go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ 94 && rm -rf "$GOPATH" 95 96 # Install notary and notary-server 97 ENV NOTARY_VERSION v0.5.0 98 RUN set -x \ 99 && export GOPATH="$(mktemp -d)" \ 100 && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ 101 && (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION") \ 102 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 103 go build -buildmode=pie -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \ 104 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 105 go build -buildmode=pie -o /usr/local/bin/notary github.com/docker/notary/cmd/notary \ 106 && rm -rf "$GOPATH" 107 108 # Get the "docker-py" source so we can run their integration tests 109 ENV DOCKER_PY_COMMIT 8b246db271a85d6541dc458838627e89c683e42f 110 # To run integration tests docker-pycreds is required. 111 RUN git clone https://github.com/docker/docker-py.git /docker-py \ 112 && cd /docker-py \ 113 && git checkout -q $DOCKER_PY_COMMIT \ 114 && pip install docker-pycreds==0.2.1 \ 115 && pip install -r test-requirements.txt 116 117 # Install yamllint for validating swagger.yaml 118 RUN pip install yamllint==1.5.0 119 120 # Install go-swagger for validating swagger.yaml 121 ENV GO_SWAGGER_COMMIT c28258affb0b6251755d92489ef685af8d4ff3eb 122 RUN set -x \ 123 && export GOPATH="$(mktemp -d)" \ 124 && git clone https://github.com/go-swagger/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \ 125 && (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT") \ 126 && go build -o /usr/local/bin/swagger github.com/go-swagger/go-swagger/cmd/swagger \ 127 && rm -rf "$GOPATH" 128 129 # Set user.email so crosbymichael's in-container merge commits go smoothly 130 RUN git config --global user.email 'docker-dummy@example.com' 131 132 # Add an unprivileged user to be used for tests which need it 133 RUN groupadd -r docker 134 RUN useradd --create-home --gid docker unprivilegeduser 135 136 VOLUME /var/lib/docker 137 WORKDIR /go/src/github.com/docker/docker 138 ENV DOCKER_BUILDTAGS apparmor seccomp selinux 139 140 # Let us use a .bashrc file 141 RUN ln -sfv $PWD/.bashrc ~/.bashrc 142 143 # Register Docker's bash completion. 144 RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker 145 146 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling 147 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/ 148 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ 149 buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \ 150 busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \ 151 busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \ 152 debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \ 153 hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c 154 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list) 155 # 156 157 # Install tomlv, vndr, runc, containerd, tini, proxy dockercli 158 # Please edit hack/dockerfile/install/<name>.installer to update them. 159 COPY hack/dockerfile/install hack/dockerfile/install 160 RUN for i in tomlv vndr tini gometalinter proxy dockercli runc containerd; \ 161 do hack/dockerfile/install/install.sh $i; \ 162 done 163 ENV PATH=/usr/local/cli:$PATH 164 165 166 # Wrap all commands in the "docker-in-docker" script to allow nested containers 167 ENTRYPOINT ["hack/dind"] 168 169 # Options for hack/validate/gometalinter 170 ENV GOMETALINTER_OPTS="--deadline=4m -j2" 171 172 # Upload docker source 173 COPY . /go/src/github.com/docker/docker