I am trying to run a mesos-slave container on MacOS with an ARM64 architecture. Since there is no native ARM64 Docker image for mesos-slave on dockerhub, I have to build my image with a base centos7 image.

FROM centos:centos7

RUN yum -y update && \
    rpm -Uvh http://repos.mesosphere.io/el/7/noarch/RPMS/mesosphere-el-repo-7-3.noarch.rpm && \
    yum -y install mesos-1.10.0 && \
    yum-config-manager     --add-repo     https://download.docker.com/linux/centos/docker-ce.repo && \
    yum -y install docker-ce docker-ce-cli containerd.io && \
    yum -y clean all

ENTRYPOINT ["mesos-slave"]
EXPOSE 5051

I get the following error while trying to run the container.

EXIT with status 1: Failed to create a containerizer: Could not create DockerContainerizer: Failed to create docker: Failed to find a mounted cgroups hierarchy for the 'cpu' subsystem; you probably need to mount cgroups manually

The command being used

docker run \
--name local-mesos-slave \
-p 5051:5051 \
-e MESOS_MASTER=zk://local-zookeeper:2181/mesos \
-e MESOS_CONTAINERIZERS=docker \
-e MESOS_WORK_DIR=/tmp/mesos \
-e MESOS_SYSTEMD_ENABLE_SUPPORT=false \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
mesos-slave:latest

I have a similar approach to building mesos-master and mesos-zookeeper and they are working fine. Also, I am aware there are no cgroups on MacOS. I tried multiple approaches like using Podman, Colima and creating a symlink via synthetic.conf file, but they don't work either.

So my question is how do I get past the cgroup error for my Docker container on MacOS with ARM64 arch?

0

There are 0 best solutions below