Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRITICAL:docker_shell:The binfmt_misc system could not be mounted. #936

Open
J2B4U opened this issue Apr 21, 2023 · 1 comment
Open

CRITICAL:docker_shell:The binfmt_misc system could not be mounted. #936

J2B4U opened this issue Apr 21, 2023 · 1 comment

Comments

@J2B4U
Copy link

J2B4U commented Apr 21, 2023

Hello I try to build an ONL myself but I cannot pass the step of the make docker I always get this error

root@CT107:~/OpenNetworkLinux# make docker
Pulling opennetworklinux/builder8:1.11...
done.
[ ok ] Starting apt-cacher-ng: apt-cacher-ng.
mount: permission denied
CRITICAL:docker_shell:The binfmt_misc system could not be mounted.
Makefile:56: recipe for target 'docker' failed
make: *** [docker] Error 1

any idea ? I tried many docker version and many deb os version 9-10-11 and I always bet stuck at same place

@ljluestc
Copy link

#!/bin/bash

docker ps
docker_info_exit_code=$?
if [ $docker_info_exit_code -ne 0 ]; then
    echo "Error: Insufficient Docker permissions. Make sure you have the necessary privileges to run Docker commands."
    exit 1
fi

if systemctl is-active --quiet apparmor; then
    sudo service apparmor stop
    echo "AppArmor service stopped."
fi

if ! mount | grep -q binfmt_misc; then
    echo "Error: binfmt_misc is not mounted on the host system."
    exit 1
fi

sudo service docker restart
echo "Docker service restarted."

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
echo "Docker updated to the latest version."

echo "Docker troubleshooting steps completed."

Please try this script for more insight about environment settings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants