From f502f92afe8331dc40306f620947352f8f9484e0 Mon Sep 17 00:00:00 2001 From: Jan Kiszka Date: Sat, 14 Nov 2020 09:18:09 +0100 Subject: [PATCH] Dockerfile.isar: Improve binfmt_misc setup The init script is a bit noisy, so replace it with a direct call of update-binfmts. That tool unfortunately fails to report missing kernel support via a proper error code. Catch that by doing an extra check on the mounted filesystem. Signed-off-by: Jan Kiszka --- Dockerfile.isar | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.isar b/Dockerfile.isar index e9f6f9a..f8dd5ba 100644 --- a/Dockerfile.isar +++ b/Dockerfile.isar @@ -20,4 +20,4 @@ RUN echo "builder ALL=NOPASSWD: ALL" > /etc/sudoers.d/builder-nopasswd && \ RUN echo "Defaults env_keep += \"ftp_proxy http_proxy https_proxy no_proxy\"" \ > /etc/sudoers.d/env_keep && chmod 660 /etc/sudoers.d/env_keep -RUN sed -i 's|#!/bin/bash|\0\n\n/etc/init.d/binfmt-support start|' /kas/container-entrypoint +RUN sed -i 's|#!/bin/bash|\0\n\nupdate-binfmts --enable && [ -f /proc/sys/fs/binfmt_misc/status ]|' /kas/container-entrypoint