From 2ecd2cfe3b5ec7cf2103ae83a344a987802bd101 Mon Sep 17 00:00:00 2001 From: NAKNAO-nnct Date: Sat, 8 Mar 2025 13:59:05 +0900 Subject: [PATCH 1/5] update Ubuntu24.04 --- Dockerfile | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 455d4dfd..ddf177cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,27 @@ # Dockerfile for GNS3 server development -FROM ubuntu:18.04 +FROM ubuntu:24.04 -ENV DEBIAN_FRONTEND noninteractive +ENV DEBIAN_FRONTEND=noninteractive # Set the locale -ENV LANG en_US.UTF-8 -ENV LANGUAGE en_US:en -ENV LC_ALL en_US.UTF-8 +ENV LANG=en_US.UTF-8 +ENV LANGUAGE=en_US:en +ENV LC_ALL=en_US.UTF-8 + +# this environment is externally managed +ENV PIP_BREAK_SYSTEM_PACKAGES=1 RUN apt-get update && apt-get install -y software-properties-common RUN add-apt-repository ppa:gns3/ppa RUN apt-get update && apt-get install -y \ locales \ python3-pip \ - python3-dev \ + python3-dev \ qemu-system-x86 \ qemu-kvm \ - libvirt-bin \ - x11vnc + libvirt-daemon-system libvirt-clients \ + x11vnc RUN locale-gen en_US.UTF-8 @@ -32,4 +35,4 @@ RUN pip3 install --no-cache-dir -r /server/requirements.txt EXPOSE 3080 -CMD python3 -m gns3server +CMD [ "python3", "-m", "gns3server", "--port", "3080"] From 21ebb934f44b4c385662da12ca03d0513a8d5826 Mon Sep 17 00:00:00 2001 From: NAKNAO-nnct Date: Sat, 8 Mar 2025 14:08:42 +0900 Subject: [PATCH 2/5] add compose.yaml --- compose.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 compose.yaml diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..cb0343af --- /dev/null +++ b/compose.yaml @@ -0,0 +1,7 @@ +services: + gen3-server: + build: + context: . + dockerfile: Dockerfile + ports: + - "8001:3080" From 00bf1c028be9b2337137fb30d5ad03ad4d774e38 Mon Sep 17 00:00:00 2001 From: NAKNAO-nnct Date: Sat, 8 Mar 2025 14:11:42 +0900 Subject: [PATCH 3/5] Update README to Run Docker Compose --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 059a1238..d61e4298 100644 --- a/README.md +++ b/README.md @@ -112,6 +112,12 @@ For development, you can run the GNS3 server in a container bash scripts/docker_dev_server.sh ``` +#### use Docker Compose + +``` {.bash} +docker compose up -d +``` + ### Run as daemon (Unix only) You will find init sample scripts for various systems inside the init From e262a46cfd53a5408368865f275726aabf71f6e8 Mon Sep 17 00:00:00 2001 From: NAKNAO-nnct Date: Sat, 8 Mar 2025 20:19:37 +0900 Subject: [PATCH 4/5] rm space --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ddf177cb..b4379e7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,4 +35,4 @@ RUN pip3 install --no-cache-dir -r /server/requirements.txt EXPOSE 3080 -CMD [ "python3", "-m", "gns3server", "--port", "3080"] +CMD ["python3", "-m", "gns3server", "--port", "3080"] From 018598a30007ea38dfe8bd35271ac5468753d8e6 Mon Sep 17 00:00:00 2001 From: NAKNAO-nnct Date: Sat, 8 Mar 2025 20:22:06 +0900 Subject: [PATCH 5/5] refactor --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b4379e7b..afef0689 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,4 +35,4 @@ RUN pip3 install --no-cache-dir -r /server/requirements.txt EXPOSE 3080 -CMD ["python3", "-m", "gns3server", "--port", "3080"] +CMD [ "python3", "-m", "gns3server", "--port", "3080" ]