Skip to content

Commit

Permalink
chore(Docker): Update dev container to ubuntu24.04 (#21044)
Browse files Browse the repository at this point in the history
  • Loading branch information
sogladev authored Jan 19, 2025
1 parent f7ae511 commit 5bc512f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
49 changes: 37 additions & 12 deletions apps/docker/Dockerfile.dev-server
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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 \
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5bc512f

Please sign in to comment.