Request docker build for TrinityCore-3.3.5-with-NPCBots
At the moment I am using an old docker implementation:
https://registry.hub.docker.com/layers/fdrake/trinitycore/3.3.5-trinitybots/images/sha256-19a490a4dd0d7c6d3876d6cb0d354ba181e32514082fe857c509db5a86ea9ee7?context=explore
Could you maybe help me build a docker based on: TrinityCore-3.3.5-with-NPCBots?
Keeping an up-to-date docker build of trinitycore with npcbots would benefit anybody not able to keep versions up to date. Yes I am talking about me :).
Of course I am more than willing to make a donation to the cause.
It shouldn't be difficult to make a docker script to build and set up latest NPCBots, especially since base script exists already. Is that what you need? SQL files need to be arranged differently but otherwise the script can be even shorter than what you present I suppose, since it's going to be based on a single repository.
Oh, and forget about money. I think most 'normal' services which were used for that have been blocking transfers to russian account for quite some time now.
Thing is im not sure where to start building the docker. The docker should be able to start as single docker with mysql, auth and world in one service. If that works I will import the existing sql.
I would really want to learn how to best approach a docker build like this. But my docker build skills are really bad at best :).
When things calm down I will remember your efforts. A honest IOU.
Here is the base Dockerfile.
- Pulls latest TrinityCore-with-NPCBots
- Builds
- Imports full DB (including bot SQLs)
- [Optional] Imports server data (dbc, maps, vmaps, mmaps)
- Does some cleanup No config import No mysql service autostart Only default ports are exposed
################################################################
#
# "TrinityCore+NPCBots latest" docker build
#
################################################################
FROM ubuntu:20.04
# Timezone (must be a valid tzdata value)
ARG tz=Etc/UTC
# Number of cores used during core build
ARG cores=3
# Build tools or not
ARG tools=0
# Server build type
ARG buildtype=MinSizeRel
# Trinity world DB release to use (3.3.5)
ARG TDB_fulladdr=https://github.com/TrinityCore/TrinityCore/releases/download/TDB335.22081/TDB_full_world_335.22081_2022_08_15.7z
#
# Optional data archive containing data folders: dbc, maps [, vmaps, mmaps]
# You have to uncomment 3 (three) rows below to use it without errors:
# 1) ADD ./tc_data.7z /server/bin/tc_data.7z
# 2) mv /root/tc_data.7z . && 7zr x tc_data.7z &&\
# 3) rm -f tc_data* &&\
#
#ADD ./tc_data.7z /root/tc_data.7z
ENV TZ=$tz
EXPOSE 3724
EXPOSE 8085
RUN set -e && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone &&\
apt-get update &&\
apt-get install -y git cmake make gcc g++ mysql-server libmysqlclient-dev\
libreadline-dev libncurses-dev libboost-all-dev libssl-dev libbz2-dev p7zip wget &&\
c++ --version &&\
cd ~/ &&\
git clone -b npcbots_3.3.5 --depth 1\
https://github.com/trickerer/TrinityCore-3.3.5-with-NPCBots.git TC &&\
cd ~/TC && git status &&\
mkdir build && cd build &&\
cmake ../ -DWITH_COREDEBUG=0 -DTOOLS=$tools -DCMAKE_BUILD_TYPE=$buildtype -DCMAKE_INSTALL_PREFIX=/server &&\
make -j $cores install &&\
service mysql start &&\
cd ~/TC/sql/Bots &&\
cat updates/auth/*.sql > ALL_auth.sql &&\
cat characters_bots.sql > ALL_characters.sql && cat updates/characters/*.sql >> ALL_characters.sql &&\
cat *world_*.sql > ALL_world.sql && cat updates/world/*.sql >> ALL_world.sql &&\
mv ALL_auth.sql ../updates/auth/3.3.5 &&\
mv ALL_characters.sql ../updates/characters/3.3.5 &&\
mv ALL_world.sql ../updates/world/3.3.5 &&\
cd ~/TC && mv sql .. && rm -rf * && mv ../sql . &&\
cd /server/etc &&\
cp worldserver.conf.dist worldserver.conf && cp authserver.conf.dist authserver.conf &&\
cd /server/bin &&\
wget -q -O TDB.7z $TDB_fulladdr &&\
7zr x TDB.7z && mv TDB_full*.sql TDB.sql &&\
# mv /root/tc_data.7z . && 7zr x tc_data.7z &&\
mysql -uroot < ~/TC/sql/create/create_mysql.sql &&\
mysql -utrinity -ptrinity auth < ~/TC/sql/base/auth_database.sql &&\
mysql -utrinity -ptrinity characters < ~/TC/sql/base/characters_database.sql &&\
mysql -utrinity -ptrinity world < TDB.sql &&\
rm -f TDB* &&\
# rm -f tc_data* &&\
apt-get remove -y git cmake make gcc g++ p7zip wget &&\
apt-get -y autoremove && apt-get clean &&\
./authserver --version && ./worldserver --version
There are people much more experienced with docker than me. Probably @williamchai's fork is the best place to look right now.
Feel free to use image like https://hub.docker.com/r/nicolaw/trinitycore (with instruction) or mine https://hub.docker.com/r/ycmk/trinitycore-npcbots/tags (haven't add instruction but should be same as nicolaw's)
I guess can be closed as resolved