Skip to content

Update Dockerfile to use Python 3.10 instead of Python 3.8 #2523

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

Open
wants to merge 1 commit into
base: 3.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 .
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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