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