mirror of https://github.com/k3s-io/k3s
macOS and docker for mac don't play nicely with mktemp
On macOS mktemp -d drops something in /var/folders, which isn't shared by default with Docker for Mac. Thus I can't run docker with that volume mounted to build binaries for test images. So instead, tell mktemp to use kubernetes/_tmp as its base, which is what I see some of the hack/verify-* scripts use.pull/8/head
parent
5de3896d0d
commit
2de8daf024
|
@ -56,7 +56,10 @@ build() {
|
||||||
|
|
||||||
# Create a temporary directory for every architecture and copy the image content
|
# Create a temporary directory for every architecture and copy the image content
|
||||||
# and build the image from temporary directory
|
# and build the image from temporary directory
|
||||||
temp_dir=$(mktemp -d)
|
mkdir -p ${KUBE_ROOT}/_tmp
|
||||||
|
temp_dir=$(mktemp -d ${KUBE_ROOT}/_tmp/test-images-build.XXXXXX)
|
||||||
|
kube::util::trap_add "rm -rf ${temp_dir}" EXIT
|
||||||
|
|
||||||
cp -r ${IMAGE}/* ${temp_dir}
|
cp -r ${IMAGE}/* ${temp_dir}
|
||||||
if [[ -f ${IMAGE}/Makefile ]]; then
|
if [[ -f ${IMAGE}/Makefile ]]; then
|
||||||
# make bin will take care of all the prerequisites needed
|
# make bin will take care of all the prerequisites needed
|
||||||
|
|
Loading…
Reference in New Issue