Merge pull request #99022 from vinayakankugoyal/dockerfile2

Use ARG instead of sed in the conformance image.
This commit is contained in:
Kubernetes Prow Robot 2021-02-12 15:35:04 -08:00 committed by GitHub
commit f24b87ec8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -12,7 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
FROM BASEIMAGE
ARG BASEIMAGE
FROM ${BASEIMAGE}
COPY ginkgo /usr/local/bin/
COPY e2e.test /usr/local/bin/

View File

@ -54,13 +54,12 @@ endif
chmod a+rx ${TEMP_DIR}/e2e.test
chmod a+rx ${TEMP_DIR}/gorunner
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \
--platform linux/${ARCH} \
--load \
--pull \
-t ${REGISTRY}/conformance-${ARCH}:${VERSION} \
--build-arg BASEIMAGE=$(BASEIMAGE) \
${TEMP_DIR}
rm -rf "${TEMP_DIR}"