diff --git a/Dockerfile b/Dockerfile index 4ced87dc..cb224796 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,15 +15,22 @@ COPY ./requirements.txt /gns3server/requirements.txt RUN DEBIAN_FRONTEND=noninteractive apt install -y \ locales \ software-properties-common \ - python3-pip \ - python3-all \ - python3-setuptools \ - python3-dev \ busybox-static \ gcc \ qemu-kvm \ libvirt-daemon-system +RUN apt install -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev + +RUN wget https://www.python.org/ftp/python/3.10.16/Python-3.10.16.tgz +RUN tar -xf Python-3.10.16.tgz +RUN cd Python-3.10.16 && ./configure --enable-optimizations && make -j 4 && make altinstall + +RUN wget https://bootstrap.pypa.io/get-pip.py +RUN python3.10 get-pip.py +RUN python3.10 -m pip install --upgrade pip +RUN python3.10 -m pip install --upgrade setuptools + RUN add-apt-repository ppa:gns3/ppa && apt update && DEBIAN_FRONTEND=noninteractive apt install -y \ vpcs \ ubridge \ @@ -34,4 +41,4 @@ COPY . /gns3server RUN mkdir -p ~/.config/GNS3/3.0/ RUN cp scripts/gns3_server.conf ~/.config/GNS3/3.0/ -RUN python3 -m pip install . +RUN python3.10 -m pip install . diff --git a/docker-compose.yml b/docker-compose.yml index 548a092b..e5b0c698 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: volumes: - ./gns3server:/server/ - /var/run/docker.sock:/var/run/docker.sock - command: python3 -m gns3server --local --port 3080 + command: python3.10 -m gns3server --local --port 3080 ports: - 3080:3080 - 5000-5100:5000-5100