Merge pull request #98569 from saschagrunert/conformance-buildx

Switch to `docker buildx` for conformance image
This commit is contained in:
Kubernetes Prow Robot 2021-01-29 15:11:55 -08:00 committed by GitHub
commit b184272e27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View File

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM --platform=linux/ARCH BASEIMAGE
FROM BASEIMAGE
COPY ginkgo /usr/local/bin/
COPY e2e.test /usr/local/bin/

View File

@ -54,9 +54,14 @@ endif
chmod a+rx ${TEMP_DIR}/e2e.test
chmod a+rx ${TEMP_DIR}/gorunner
cd ${TEMP_DIR} && sed -i.back "s|ARCH|${ARCH}|g; s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
docker build --pull -t ${REGISTRY}/conformance-${ARCH}:${VERSION} ${TEMP_DIR}
docker buildx build \
--platform linux/${ARCH} \
--load \
--pull \
-t ${REGISTRY}/conformance-${ARCH}:${VERSION} \
${TEMP_DIR}
rm -rf "${TEMP_DIR}"
push: build