forked from azerothcore/azerothcore-wotlk
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(Docker): add comments to explain the building steps (azerothcor…
- Loading branch information
1 parent
6ccab63
commit c638ae8
Showing
4 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
FROM ubuntu:bionic | ||
|
||
# install the required dependencies to run the authserver | ||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev; | ||
|
||
# run the authserver located in the directory "docker/authserver/bin" of the host machine | ||
CMD ["/azeroth-server/bin/authserver"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,25 @@ | ||
FROM ubuntu:bionic | ||
|
||
# install the required dependencies to compile AzerothCore | ||
RUN apt update && apt install -y git cmake make gcc g++ clang libmysqlclient-dev libssl-dev libbz2-dev libreadline-dev libncurses-dev libace-6.* libace-dev | ||
|
||
# copy the sources from the host machine to the Docker container | ||
ADD .git /azerothcore/.git | ||
ADD deps /azerothcore/deps | ||
ADD conf/config.cmake.dist /azerothcore/conf/config.cmake.dist | ||
ADD src /azerothcore/src | ||
ADD CMakeLists.txt /azerothcore/CMakeLists.txt | ||
|
||
ENTRYPOINT cd azerothcore/build && \ | ||
# run cmake | ||
cmake ../ -DCMAKE_INSTALL_PREFIX=/azeroth-server -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DTOOLS=0 -DSCRIPTS=1 && \ | ||
# calculate the optimal number of threads | ||
MTHREADS=`grep -c ^processor /proc/cpuinfo`; MTHREADS=$(($MTHREADS + 2)) && \ | ||
# run compilation | ||
make -j $MTHREADS && \ | ||
make install -j $MTHREADS && \ | ||
# copy the binary files "authserver" and "worldserver" files back to the host | ||
# - the directories "/binworldserver" and "/binauthserver" are meant to be bound to the host directories | ||
# - see docker/build/README.md to view the bindings | ||
cp /azeroth-server/bin/worldserver /binworldserver && \ | ||
cp /azeroth-server/bin/authserver /binauthserver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,24 @@ | ||
FROM alpine:latest as builder | ||
|
||
# install bash | ||
RUN apk add --no-cache bash | ||
|
||
# copy the sources from the host machine | ||
COPY apps /azerothcore/apps | ||
COPY bin /azerothcore/bin | ||
COPY conf /azerothcore/conf | ||
COPY data /azerothcore/data | ||
COPY deps /azerothcore/deps | ||
COPY acore.json /azerothcore/acore.json | ||
|
||
# run the AzerothCore database assembler | ||
RUN ./azerothcore/bin/acore-db-asm 1 | ||
|
||
FROM mysql:5.7 | ||
|
||
# copy files from the previous build stage - see: https://docs.docker.com/develop/develop-images/multistage-build/ | ||
COPY --from=builder /azerothcore/env/dist/sql /sql | ||
|
||
# adding the "generate-databases.sh" to the directory "/docker-entrypoint-initdb.d" | ||
# because all scripts included in that directory will automatically be executed when the docker container starts | ||
ADD docker/database/generate-databases.sh /docker-entrypoint-initdb.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
FROM ubuntu:bionic | ||
|
||
# install the required dependencies to run the authserver | ||
RUN apt update && apt install -y libmysqlclient-dev libssl-dev libace-6.* libace-dev libreadline-dev; | ||
|
||
# run the worldserver located in the directory "docker/worldserver/bin" of the host machine | ||
CMD ["/azeroth-server/bin/worldserver"] |