From 5bc512f75cb7a6af07e80d7913626a630bd823fe Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Sun, 19 Jan 2025 12:46:28 +0100 Subject: [PATCH] chore(Docker): Update dev container to ubuntu24.04 (#21044) --- apps/docker/Dockerfile.dev-server | 49 +++++++++++++++++++++++-------- docker-compose.yml | 2 ++ 2 files changed, 39 insertions(+), 12 deletions(-) diff --git a/apps/docker/Dockerfile.dev-server b/apps/docker/Dockerfile.dev-server index 8924c4688dad55..fab54bd35d582a 100644 --- a/apps/docker/Dockerfile.dev-server +++ b/apps/docker/Dockerfile.dev-server @@ -7,7 +7,7 @@ # #================================================================= -FROM ubuntu:22.04 as dev +FROM ubuntu:24.04 as dev ARG USER_ID=1000 ARG GROUP_ID=1000 ARG DOCKER_USER=acore @@ -29,13 +29,37 @@ ENV TZ=$TZ ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ - && apt-get install -y \ - gdb gdbserver git dos2unix lsb-core sudo curl unzip \ - make cmake clang libmysqlclient-dev libboost-all-dev \ - build-essential libtool cmake-data openssl libgoogle-perftools-dev google-perftools \ - libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \ - libncurses5-dev ccache tzdata \ - && rm -rf /var/lib/apt/lists/* + && apt-get install -y --no-install-recommends \ + # Classic install + git \ + clang lldb lld clang-format clang-tidy \ + make cmake \ + gcc g++ \ + libmysqlclient-dev \ + libssl-dev \ + libbz2-dev \ + libreadline-dev \ + libncurses-dev \ + mysql-server \ + libboost-all-dev \ + # Other + curl \ + unzip \ + sudo \ + gdb gdbserver \ + libtool \ + build-essential \ + cmake-data \ + openssl \ + google-perftools libgoogle-perftools-dev \ + libmysql++-dev \ + ccache \ + tzdata \ + # Utility for column command used by dashboard + util-linux \ + # Certificates for downloading client data + ca-certificates \ + && rm -rf /var/lib/apt/lists/* # Ensure git will work with the AzerothCore source directory RUN git config --global --add safe.directory /azerothcore @@ -45,10 +69,11 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ && echo $TZ > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata # Create a non-root user -RUN addgroup --gid "$GROUP_ID" "$DOCKER_USER" && \ - adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" && \ - passwd -d "$DOCKER_USER" && \ - echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers +RUN userdel --remove ubuntu \ + && addgroup --gid "$GROUP_ID" "$DOCKER_USER" \ + && adduser --disabled-password --gecos '' --uid "$USER_ID" --gid "$GROUP_ID" "$DOCKER_USER" \ + && passwd -d "$DOCKER_USER" \ + && echo "$DOCKER_USER ALL=(ALL:ALL) NOPASSWD: ALL" >> /etc/sudoers # must be created to set the correct permissions on them RUN mkdir -p \ diff --git a/docker-compose.yml b/docker-compose.yml index 808c759b07e464..214b7cdd4c4704 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -188,6 +188,8 @@ services: AC_LOGIN_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_auth" AC_WORLD_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_world" AC_CHARACTER_DATABASE_INFO: "ac-database;3306;root;${DOCKER_DB_ROOT_PASSWORD:-password};acore_characters" + networks: + - ac-network ports: - ${DOCKER_AUTH_EXTERNAL_PORT:-3724}:3724 - ${DOCKER_WORLD_EXTERNAL_PORT:-8085}:8085