github.com/rita33cool1/iot-system-gateway@v0.0.0-20200911033302-e65bde238cc5/docker-engine/Dockerfile.armhf (about) 1 # This file describes the standard way to build Docker on ARMv7, 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.armhf . 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 arm32v7/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 aufs-tools \ 28 automake \ 29 bash-completion \ 30 btrfs-tools \ 31 build-essential \ 32 createrepo \ 33 curl \ 34 cmake \ 35 dpkg-sig \ 36 git \ 37 iptables \ 38 jq \ 39 net-tools \ 40 libapparmor-dev \ 41 libcap-dev \ 42 libdevmapper-dev \ 43 libseccomp-dev \ 44 libsystemd-dev \ 45 libtool \ 46 libudev-dev \ 47 mercurial \ 48 pigz \ 49 pkg-config \ 50 python-backports.ssl-match-hostname \ 51 python-dev \ 52 python-mock \ 53 python-pip \ 54 python-requests \ 55 python-setuptools \ 56 python-websocket \ 57 python-wheel \ 58 xfsprogs \ 59 tar \ 60 thin-provisioning-tools \ 61 vim-common \ 62 --no-install-recommends \ 63 && pip install awscli==1.10.15 64 65 # Install Go 66 # IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored 67 ENV GO_VERSION 1.9.5 68 RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-armv6l.tar.gz" \ 69 | tar -xzC /usr/local 70 ENV PATH /go/bin:/usr/local/go/bin:$PATH 71 ENV GOPATH /go 72 73 # We're building for armhf, which is ARMv7, so let's be explicit about that 74 ENV GOARCH arm 75 ENV GOARM 7 76 77 # Install two versions of the registry. The first is an older version that 78 # only supports schema1 manifests. The second is a newer version that supports 79 # both. This allows integration-cli tests to cover push/pull with both schema1 80 # and schema2 manifests. 81 ENV REGISTRY_COMMIT_SCHEMA1 ec87e9b6971d831f0eff752ddb54fb64693e51cd 82 ENV REGISTRY_COMMIT cb08de17d74bef86ce6c5abe8b240e282f5750be 83 RUN set -x \ 84 && export GOPATH="$(mktemp -d)" \ 85 && git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \ 86 && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ 87 && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ 88 go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ 89 && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1") \ 90 && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ 91 go build -buildmode=pie -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry \ 92 && rm -rf "$GOPATH" 93 94 # Install notary and notary-server 95 ENV NOTARY_VERSION v0.5.0 96 RUN set -x \ 97 && export GOPATH="$(mktemp -d)" \ 98 && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ 99 && (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION") \ 100 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 101 go build -buildmode=pie -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \ 102 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 103 go build -buildmode=pie -o /usr/local/bin/notary github.com/docker/notary/cmd/notary \ 104 && rm -rf "$GOPATH" 105 106 # Get the "docker-py" source so we can run their integration tests 107 ENV DOCKER_PY_COMMIT 8b246db271a85d6541dc458838627e89c683e42f 108 # To run integration tests docker-pycreds is required. 109 RUN git clone https://github.com/docker/docker-py.git /docker-py \ 110 && cd /docker-py \ 111 && git checkout -q $DOCKER_PY_COMMIT \ 112 && pip install docker-pycreds==0.2.1 \ 113 && pip install -r test-requirements.txt 114 115 # Set user.email so crosbymichael's in-container merge commits go smoothly 116 RUN git config --global user.email 'docker-dummy@example.com' 117 118 # Add an unprivileged user to be used for tests which need it 119 RUN groupadd -r docker 120 RUN useradd --create-home --gid docker unprivilegeduser 121 122 VOLUME /var/lib/docker 123 WORKDIR /go/src/github.com/docker/docker 124 ENV DOCKER_BUILDTAGS apparmor seccomp selinux 125 126 # Let us use a .bashrc file 127 RUN ln -sfv $PWD/.bashrc ~/.bashrc 128 129 # Register Docker's bash completion. 130 RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker 131 132 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling 133 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/ 134 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ 135 buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \ 136 busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \ 137 busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \ 138 debian:jessie@sha256:287a20c5f73087ab406e6b364833e3fb7b3ae63ca0eb3486555dc27ed32c6e60 \ 139 hello-world:latest@sha256:be0cd392e45be79ffeffa6b05338b98ebb16c87b255f48e297ec7f98e123905c 140 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list) 141 142 # Install tomlv, vndr, runc, containerd, tini, proxy dockercli 143 # Please edit hack/dockerfile/install/<name>.installer to update them. 144 COPY hack/dockerfile/install hack/dockerfile/install 145 RUN for i in tomlv vndr tini gometalinter proxy dockercli runc containerd; \ 146 do hack/dockerfile/install/install.sh $i; \ 147 done 148 ENV PATH=/usr/local/cli:$PATH 149 150 ENTRYPOINT ["hack/dind"] 151 152 # Options for hack/validate/gometalinter 153 ENV GOMETALINTER_OPTS="--deadline=10m -j2" 154 155 # Upload docker source 156 COPY . /go/src/github.com/docker/docker