mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #99022 from vinayakankugoyal/dockerfile2
Use ARG instead of sed in the conformance image.
This commit is contained in:
commit
f24b87ec8a
@ -12,7 +12,9 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
FROM BASEIMAGE
|
ARG BASEIMAGE
|
||||||
|
|
||||||
|
FROM ${BASEIMAGE}
|
||||||
|
|
||||||
COPY ginkgo /usr/local/bin/
|
COPY ginkgo /usr/local/bin/
|
||||||
COPY e2e.test /usr/local/bin/
|
COPY e2e.test /usr/local/bin/
|
||||||
|
@ -54,13 +54,12 @@ endif
|
|||||||
chmod a+rx ${TEMP_DIR}/e2e.test
|
chmod a+rx ${TEMP_DIR}/e2e.test
|
||||||
chmod a+rx ${TEMP_DIR}/gorunner
|
chmod a+rx ${TEMP_DIR}/gorunner
|
||||||
|
|
||||||
cd ${TEMP_DIR} && sed -i.back "s|BASEIMAGE|${BASEIMAGE}|g" Dockerfile
|
|
||||||
|
|
||||||
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \
|
DOCKER_CLI_EXPERIMENTAL=enabled docker buildx build \
|
||||||
--platform linux/${ARCH} \
|
--platform linux/${ARCH} \
|
||||||
--load \
|
--load \
|
||||||
--pull \
|
--pull \
|
||||||
-t ${REGISTRY}/conformance-${ARCH}:${VERSION} \
|
-t ${REGISTRY}/conformance-${ARCH}:${VERSION} \
|
||||||
|
--build-arg BASEIMAGE=$(BASEIMAGE) \
|
||||||
${TEMP_DIR}
|
${TEMP_DIR}
|
||||||
rm -rf "${TEMP_DIR}"
|
rm -rf "${TEMP_DIR}"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user