github.com/LazyboyChen7/engine@v17.12.1-ce-rc2+incompatible/Dockerfile.ppc64le (about) 1 # This file describes the standard way to build Docker on ppc64le, 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.ppc64le . 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 ppc64le/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 btrfs-tools \ 32 build-essential \ 33 cmake \ 34 createrepo \ 35 curl \ 36 dpkg-sig \ 37 git \ 38 iptables \ 39 jq \ 40 net-tools \ 41 libapparmor-dev \ 42 libcap-dev \ 43 libdevmapper-dev \ 44 libseccomp-dev \ 45 libsystemd-dev \ 46 libtool \ 47 libudev-dev \ 48 mercurial \ 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 64 # Install Go 65 # NOTE: official ppc64le go binaries weren't available until go 1.6.4 and 1.7.4 66 # IMPORTANT: When updating this please note that stdlib archive/tar pkg is vendored 67 ENV GO_VERSION 1.9.4 68 RUN curl -fsSL "https://golang.org/dl/go${GO_VERSION}.linux-ppc64le.tar.gz" \ 69 | tar -xzC /usr/local 70 71 ENV PATH /go/bin:/usr/local/go/bin:$PATH 72 ENV GOPATH /go 73 74 # Install two versions of the registry. The first is an older version that 75 # only supports schema1 manifests. The second is a newer version that supports 76 # both. This allows integration-cli tests to cover push/pull with both schema1 77 # and schema2 manifests. 78 ENV REGISTRY_COMMIT_SCHEMA1 ec87e9b6971d831f0eff752ddb54fb64693e51cd 79 ENV REGISTRY_COMMIT 47a064d4195a9b56133891bbb13620c3ac83a827 80 RUN set -x \ 81 && export GOPATH="$(mktemp -d)" \ 82 && git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \ 83 && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ 84 && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ 85 go build -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ 86 && (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1") \ 87 && GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ 88 go build -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry \ 89 && rm -rf "$GOPATH" 90 91 # Install notary and notary-server 92 ENV NOTARY_VERSION v0.5.0 93 RUN set -x \ 94 && export GOPATH="$(mktemp -d)" \ 95 && git clone https://github.com/docker/notary.git "$GOPATH/src/github.com/docker/notary" \ 96 && (cd "$GOPATH/src/github.com/docker/notary" && git checkout -q "$NOTARY_VERSION") \ 97 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 98 go build -o /usr/local/bin/notary-server github.com/docker/notary/cmd/notary-server \ 99 && GOPATH="$GOPATH/src/github.com/docker/notary/vendor:$GOPATH" \ 100 go build -o /usr/local/bin/notary github.com/docker/notary/cmd/notary \ 101 && rm -rf "$GOPATH" 102 103 # Get the "docker-py" source so we can run their integration tests 104 ENV DOCKER_PY_COMMIT 1d6b5b203222ba5df7dedfcd1ee061a452f99c8a 105 # To run integration tests docker-pycreds is required. 106 RUN git clone https://github.com/docker/docker-py.git /docker-py \ 107 && cd /docker-py \ 108 && git checkout -q $DOCKER_PY_COMMIT \ 109 && pip install docker-pycreds==0.2.1 \ 110 && pip install -r test-requirements.txt 111 112 # Set user.email so crosbymichael's in-container merge commits go smoothly 113 RUN git config --global user.email 'docker-dummy@example.com' 114 115 # Add an unprivileged user to be used for tests which need it 116 RUN groupadd -r docker 117 RUN useradd --create-home --gid docker unprivilegeduser 118 119 VOLUME /var/lib/docker 120 WORKDIR /go/src/github.com/docker/docker 121 ENV DOCKER_BUILDTAGS apparmor seccomp selinux 122 123 # Let us use a .bashrc file 124 RUN ln -sfv $PWD/.bashrc ~/.bashrc 125 126 # Register Docker's bash completion. 127 RUN ln -sv $PWD/contrib/completion/bash/docker /etc/bash_completion.d/docker 128 129 # Get useful and necessary Hub images so we can "docker load" locally instead of pulling 130 COPY contrib/download-frozen-image-v2.sh /go/src/github.com/docker/docker/contrib/ 131 RUN ./contrib/download-frozen-image-v2.sh /docker-frozen-images \ 132 ppc64le/buildpack-deps:jessie@sha256:1a2f2d2cc8738f14b336aeffc3503b5c9dedf9e1f26c7313cb4999534ad4716f \ 133 ppc64le/busybox:latest@sha256:54f34c83adfab20cf0e630d879e210f07b0062cd6caaf16346a61396d50e7584 \ 134 ppc64le/debian:jessie@sha256:ea8c5b105e3790f075145b40e4be1e4488c9f33f55e6cc45182047b80a68f892 \ 135 ppc64le/hello-world:latest@sha256:7d57adf137665f748956c86089320710b66d08584db3500ed98f4bb3da637c2d 136 # See also ensureFrozenImagesLinux() in "integration-cli/fixtures_linux_daemon_test.go" (which needs to be updated when adding images to this list) 137 138 # Install tomlv, vndr, runc, containerd, tini, docker-proxy 139 # Please edit hack/dockerfile/install-binaries.sh to update them. 140 COPY hack/dockerfile/binaries-commits /tmp/binaries-commits 141 COPY hack/dockerfile/install-binaries.sh /tmp/install-binaries.sh 142 RUN /tmp/install-binaries.sh tomlv vndr runc containerd tini proxy dockercli gometalinter 143 ENV PATH=/usr/local/cli:$PATH 144 145 # Wrap all commands in the "docker-in-docker" script to allow nested containers 146 ENTRYPOINT ["hack/dind"] 147 148 # Upload docker source 149 COPY . /go/src/github.com/docker/docker