Update all build stages to output artefacts to /build
Signed-off-by: Jeff Hajewski <jeff.hajewski@gmail.com>
... | ... |
@@ -57,7 +57,7 @@ RUN apt-get update && apt-get install -y \ |
57 | 57 |
&& curl -sSL https://github.com/checkpoint-restore/criu/archive/v${CRIU_VERSION}.tar.gz | tar -C /usr/src/criu/ -xz --strip-components=1 \ |
58 | 58 |
&& cd /usr/src/criu \ |
59 | 59 |
&& make \ |
60 |
- && make PREFIX=/opt/criu install-criu |
|
60 |
+ && make PREFIX=/build/ install-criu |
|
61 | 61 |
|
62 | 62 |
FROM base AS registry |
63 | 63 |
# Install two versions of the registry. The first is an older version that |
... | ... |
@@ -71,12 +71,12 @@ RUN set -x \ |
71 | 71 |
&& git clone https://github.com/docker/distribution.git "$GOPATH/src/github.com/docker/distribution" \ |
72 | 72 |
&& (cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT") \ |
73 | 73 |
&& GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH" \ |
74 |
- go build -buildmode=pie -o /usr/local/bin/registry-v2 github.com/docker/distribution/cmd/registry \ |
|
74 |
+ go build -buildmode=pie -o /build/registry-v2 github.com/docker/distribution/cmd/registry \ |
|
75 | 75 |
&& case $(dpkg --print-architecture) in \ |
76 | 76 |
amd64|ppc64*|s390x) \ |
77 | 77 |
(cd "$GOPATH/src/github.com/docker/distribution" && git checkout -q "$REGISTRY_COMMIT_SCHEMA1"); \ |
78 | 78 |
GOPATH="$GOPATH/src/github.com/docker/distribution/Godeps/_workspace:$GOPATH"; \ |
79 |
- go build -buildmode=pie -o /usr/local/bin/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \ |
|
79 |
+ go build -buildmode=pie -o /build/registry-v2-schema1 github.com/docker/distribution/cmd/registry; \ |
|
80 | 80 |
;; \ |
81 | 81 |
esac \ |
82 | 82 |
&& rm -rf "$GOPATH" |
... | ... |
@@ -86,8 +86,8 @@ RUN set -x \ |
86 | 86 |
FROM base AS docker-py |
87 | 87 |
# Get the "docker-py" source so we can run their integration tests |
88 | 88 |
ENV DOCKER_PY_COMMIT 8b246db271a85d6541dc458838627e89c683e42f |
89 |
-RUN git clone https://github.com/docker/docker-py.git /docker-py \ |
|
90 |
- && cd /docker-py \ |
|
89 |
+RUN git clone https://github.com/docker/docker-py.git /build \ |
|
90 |
+ && cd /build \ |
|
91 | 91 |
&& git checkout -q $DOCKER_PY_COMMIT |
92 | 92 |
|
93 | 93 |
|
... | ... |
@@ -99,7 +99,7 @@ RUN set -x \ |
99 | 99 |
&& export GOPATH="$(mktemp -d)" \ |
100 | 100 |
&& git clone https://github.com/go-swagger/go-swagger.git "$GOPATH/src/github.com/go-swagger/go-swagger" \ |
101 | 101 |
&& (cd "$GOPATH/src/github.com/go-swagger/go-swagger" && git checkout -q "$GO_SWAGGER_COMMIT") \ |
102 |
- && go build -o /usr/local/bin/swagger github.com/go-swagger/go-swagger/cmd/swagger \ |
|
102 |
+ && go build -o /build/swagger github.com/go-swagger/go-swagger/cmd/swagger \ |
|
103 | 103 |
&& rm -rf "$GOPATH" |
104 | 104 |
|
105 | 105 |
|
... | ... |
@@ -107,7 +107,7 @@ FROM base AS frozen-images |
107 | 107 |
RUN apt-get update && apt-get install -y jq ca-certificates --no-install-recommends |
108 | 108 |
# Get useful and necessary Hub images so we can "docker load" locally instead of pulling |
109 | 109 |
COPY contrib/download-frozen-image-v2.sh / |
110 |
-RUN /download-frozen-image-v2.sh /docker-frozen-images \ |
|
110 |
+RUN /download-frozen-image-v2.sh /build \ |
|
111 | 111 |
buildpack-deps:jessie@sha256:dd86dced7c9cd2a724e779730f0a53f93b7ef42228d4344b25ce9a42a1486251 \ |
112 | 112 |
busybox:latest@sha256:bbc3a03235220b170ba48a157dd097dd1379299370e1ed99ce976df0355d24f0 \ |
113 | 113 |
busybox:glibc@sha256:0b55a30394294ab23b9afd58fab94e61a923f5834fba7ddbae7f8e0c11ba85e6 \ |
... | ... |
@@ -126,51 +126,51 @@ FROM base AS tomlv |
126 | 126 |
ENV INSTALL_BINARY_NAME=tomlv |
127 | 127 |
COPY hack/dockerfile/install/install.sh ./install.sh |
128 | 128 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
129 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
129 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
130 | 130 |
|
131 | 131 |
FROM base AS vndr |
132 | 132 |
ENV INSTALL_BINARY_NAME=vndr |
133 | 133 |
COPY hack/dockerfile/install/install.sh ./install.sh |
134 | 134 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
135 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
135 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
136 | 136 |
|
137 | 137 |
FROM base AS containerd |
138 | 138 |
RUN apt-get update && apt-get install -y btrfs-tools |
139 | 139 |
ENV INSTALL_BINARY_NAME=containerd |
140 | 140 |
COPY hack/dockerfile/install/install.sh ./install.sh |
141 | 141 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
142 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
142 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
143 | 143 |
|
144 | 144 |
FROM base AS proxy |
145 | 145 |
ENV INSTALL_BINARY_NAME=proxy |
146 | 146 |
COPY hack/dockerfile/install/install.sh ./install.sh |
147 | 147 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
148 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
148 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
149 | 149 |
|
150 | 150 |
FROM base AS gometalinter |
151 | 151 |
ENV INSTALL_BINARY_NAME=gometalinter |
152 | 152 |
COPY hack/dockerfile/install/install.sh ./install.sh |
153 | 153 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
154 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
154 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
155 | 155 |
|
156 | 156 |
FROM base AS dockercli |
157 | 157 |
ENV INSTALL_BINARY_NAME=dockercli |
158 | 158 |
COPY hack/dockerfile/install/install.sh ./install.sh |
159 | 159 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
160 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
160 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
161 | 161 |
|
162 | 162 |
FROM runtime-dev AS runc |
163 | 163 |
ENV INSTALL_BINARY_NAME=runc |
164 | 164 |
COPY hack/dockerfile/install/install.sh ./install.sh |
165 | 165 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
166 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
166 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
167 | 167 |
|
168 | 168 |
FROM base AS tini |
169 | 169 |
RUN apt-get update && apt-get install -y cmake vim-common |
170 | 170 |
COPY hack/dockerfile/install/install.sh ./install.sh |
171 | 171 |
ENV INSTALL_BINARY_NAME=tini |
172 | 172 |
COPY hack/dockerfile/install/$INSTALL_BINARY_NAME.installer ./ |
173 |
-RUN PREFIX=/opt/$INSTALL_BINARY_NAME ./install.sh $INSTALL_BINARY_NAME |
|
173 |
+RUN PREFIX=/build/ ./install.sh $INSTALL_BINARY_NAME |
|
174 | 174 |
|
175 | 175 |
|
176 | 176 |
|
... | ... |
@@ -214,19 +214,19 @@ RUN apt-get update && apt-get install -y \ |
214 | 214 |
bzip2 \ |
215 | 215 |
xz-utils \ |
216 | 216 |
--no-install-recommends |
217 |
-COPY --from=swagger /usr/local/bin/swagger* /usr/local/bin/ |
|
218 |
-COPY --from=frozen-images /docker-frozen-images /docker-frozen-images |
|
219 |
-COPY --from=gometalinter /opt/gometalinter/ /usr/local/bin/ |
|
220 |
-COPY --from=tomlv /opt/tomlv/ /usr/local/bin/ |
|
221 |
-COPY --from=vndr /opt/vndr/ /usr/local/bin/ |
|
222 |
-COPY --from=tini /opt/tini/ /usr/local/bin/ |
|
223 |
-COPY --from=runc /opt/runc/ /usr/local/bin/ |
|
224 |
-COPY --from=containerd /opt/containerd/ /usr/local/bin/ |
|
225 |
-COPY --from=proxy /opt/proxy/ /usr/local/bin/ |
|
226 |
-COPY --from=dockercli /opt/dockercli /usr/local/cli |
|
227 |
-COPY --from=registry /usr/local/bin/registry* /usr/local/bin/ |
|
228 |
-COPY --from=criu /opt/criu/ /usr/local/ |
|
229 |
-COPY --from=docker-py /docker-py /docker-py |
|
217 |
+COPY --from=swagger /build/swagger* /usr/local/bin/ |
|
218 |
+COPY --from=frozen-images /build/ /docker-frozen-images |
|
219 |
+COPY --from=gometalinter /build/ /usr/local/bin/ |
|
220 |
+COPY --from=tomlv /build/ /usr/local/bin/ |
|
221 |
+COPY --from=vndr /build/ /usr/local/bin/ |
|
222 |
+COPY --from=tini /build/ /usr/local/bin/ |
|
223 |
+COPY --from=runc /build/ /usr/local/bin/ |
|
224 |
+COPY --from=containerd /build/ /usr/local/bin/ |
|
225 |
+COPY --from=proxy /build/ /usr/local/bin/ |
|
226 |
+COPY --from=dockercli /build/ /usr/local/cli |
|
227 |
+COPY --from=registry /build/registry* /usr/local/bin/ |
|
228 |
+COPY --from=criu /build/ /usr/local/ |
|
229 |
+COPY --from=docker-py /build/ /docker-py |
|
230 | 230 |
# TODO: This is for the docker-py tests, which shouldn't really be needed for |
231 | 231 |
# this image, but currently CI is expecting to run this image. This should be |
232 | 232 |
# split out into a separate image, including all the `python-*` deps installed |