Skip to content

Commit

Permalink
fix: move this binfmt operation to after docker is reconfigured
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfeidau committed Oct 29, 2024
1 parent 5dca3f9 commit c6d410e
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions packer/linux/conf/bin/bk-configure-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,6 @@ cat /usr/local/lib/bk-configure-docker.sh
# shellcheck disable=SC1091
source /usr/local/lib/bk-configure-docker.sh

echo Installing qemu binfmt for multiarch...
if ! docker run \
--privileged \
--userns=host \
--pull=never \
--rm \
"tonistiigi/binfmt@${QEMU_BINFMT_DIGEST}" \
--install all; then
echo Failed to install binfmt.
echo Avaliable docker images:
docker image ls
exit 1
fi

if [[ "${DOCKER_USERNS_REMAP:-false}" == "true" ]]; then
echo Configuring user namespace remapping...

Expand Down Expand Up @@ -120,3 +106,17 @@ systemctl enable docker-gc.timer docker-low-disk-gc.timer

echo Restarting docker daemon...
systemctl restart docker

echo Installing qemu binfmt for multiarch...
if ! docker run \
--privileged \
--userns=host \
--pull=never \
--rm \
"tonistiigi/binfmt@${QEMU_BINFMT_DIGEST}" \
--install all; then
echo Failed to install binfmt.
echo Avaliable docker images:
docker image ls
exit 1
fi

0 comments on commit c6d410e

Please sign in to comment.