Home > Software design >  Issue compiling Dockerfile on MacOS(apple Sillicon)
Issue compiling Dockerfile on MacOS(apple Sillicon)

Time:06-14

This is my first time to use Docker I build a Dockerfile and use the Vscode remote container to open folder in Container. When I run this Dockerfile on Windows 11. It does not have any problem But When I run it on MacOS(apple Sillicon). It have error. after I step by step to check the Dockerfile. I find that if I install g multilib or libc6-dev-i386, it will get error. I do not have any idea about why?

Dockerfile:

FROM ubuntu:18.04
RUN apt update \
&& apt-get -y install gcc g   python \
&& apt-get -y install python-dev \
&& apt-get -y install qt4-dev-tools libqt4-dev \
&& apt-get -y install  mercurial \
&& apt-get -y install  bzr \
&& apt-get -y install cmake libc6-dev \
&& apt-get -y install  gdb valgrind \
&& apt-get -y install  flex bison libfl-dev \
&& apt-get -y install  tcpdump \
&& apt-get -y install  sqlite sqlite3 libsqlite3-dev \
&& apt-get -y install  gsl-bin libgslcblas0 \
&& apt-get -y install  libxml2 libxml2-dev \
&& apt-get -y install  libgtk2.0-0 libgtk2.0-dev \
&& apt-get -y install  vtun lxc \
&& apt -y install git \
&& apt -y install npm \
&& apt-get -y install g  -multilib libc6-dev-i386

devcontainer.json:

{
    "name": "802.11ah ns-3 simulation",
    "dockerFile": "Dockerfile",
    "appPort": 3000,
    "extensions": ["dbaeumer.vscode-eslint"],
    "settings": {
        "terminal.integrated.shell.linux": "/bin/bash"
    }
}

error information: https://i.stack.imgur.com/ZE04I.jpg

CodePudding user response:

You dont have specified the architetture of Ubuntu container in docker file. Apple silicon have ARM architecture, not all image are compatibile.

CodePudding user response:

Are you using https://docs.docker.com/desktop/mac/apple-silicon/ ?

You may need to use a VM to make this work? https://medium.com/carvago-development/my-docker-on-macos-part-1-setup-ubuntu-virtual-machine-both-intel-and-apple-silicon-cpu-5d886af0ebba

  • Related