Open xuxianda opened 8 months ago
Thanks for the issue! At the moment, I'm not able to replicate this.
Going off of the error message "ERROR 1146 (42S02) at line 2 in file: '/azerothcore/data/sql/updates/db_world/2024_01_20_05.sql': Table 'acore_world.version' doesn't exist", it looks like you don't have the db_world.version
table; can you try to create that, using these commands:
acore@56b2d1112cf3:~$ IFS=";" read MYSQL_HOST MYSQL_PORT MYSQL_USER MYSQL_PASS MYSQL_DB <<< "$AC_WORLD_DATABASE_INFO"
acore@56b2d1112cf3:~$ # important, take a backup
acore@56b2d1112cf3:~$ mysqldump -h"$MYSQL_HOST" -P"$MYSQL_PORT" -u"$MYSQL_USER" -p"$MYSQL_PASS" "$MYSQL_DB" "version" | tee env/dist/etc/$MYSQL_DB-version.$(date +%s).sql
acore@56b2d1112cf3:~$ mysql -h"$MYSQL_HOST" -P"$MYSQL_PORT" -u"$MYSQL_USER" -p"$MYSQL_PASS" "$MYSQL_DB" < data/sql/base/db_world/version.sql
mysql: [Warning] Using a password on the command line interface can be insecure.
acore@56b2d1112cf3:~$ ./entrypoint.sh env/dist/bin/dbimport
you'll first need to open a shell into the container, with docker compose run -it ac-db-import bash
.
Thank you. I'll try it out when I have time
Current Behaviour
docker-compose up -d --build
[+] Building 209.8s (56/56) FINISHED docker:default => [ac-db-import internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 8.01kB 0.0s => [ac-client-data-init internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 8.01kB 0.0s => [ac-db-import internal] load .dockerignore 0.0s => => transferring context: 261B 0.0s => [ac-client-data-init internal] load .dockerignore 0.0s => => transferring context: 261B 0.0s => [ac-worldserver internal] load metadata for docker.io/library/ubuntu:22.04 0.0s => [ac-db-import internal] load build context 6.4s => => transferring context: 869.96MB 6.4s => [ac-worldserver skeleton 1/4] FROM docker.io/library/ubuntu:22.04 0.0s => [ac-client-data-init internal] load build context 0.2s => => transferring context: 206.70kB 0.2s => CACHED [ac-worldserver skeleton 2/4] RUN mkdir -pv /azerothcore/bin /azerothcore/data /azerothcore/deps /azerothcore/env/dist/bin /azerothcore/env/dist/data/Cameras /azerothcore/env/dist/data/dbc /azerothco 0.0s => CACHED [ac-worldserver skeleton 3/4] RUN apt-get update && apt-get install -y tzdata ca-certificates && ln -snf /usr/share/zoneinfo/ /etc/localtime && echo > /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata 0.0s => CACHED [ac-worldserver skeleton 4/4] WORKDIR /azerothcore 0.0s => CACHED [ac-client-data-init client-data 1/2] RUN apt-get update && apt-get install -y curl unzip && rm -rf /var/lib/apt/lists/ 0.0s => [ac-client-data-init client-data 2/2] COPY --chown=: apps apps 0.1s => [ac-worldserver] exporting to image 4.8s => => exporting layers 1.2s => => writing image sha256:bef82daf8c6198a6d1288d73736863d88a1d0d97805d78e3086a5f6341ed61d5 0.0s => => naming to docker.io/acore/ac-wotlk-client-data:master 0.0s => => writing image sha256:feb38b05dc1447fc471af619e70ebadb31ed09572ea571862bfa0d4eec971605 0.0s => => naming to docker.io/acore/ac-wotlk-db-import:master 0.0s => => writing image sha256:9bc6b4e8c48e612c5973bc3b905c7ff07d545b1b6b5eb99c489aed29fc34208e 0.0s => => naming to docker.io/acore/ac-wotlk-authserver:master 0.0s => => writing image sha256:060718f51a047be5069a94b006f07f62d29d3101295efdc8353090b77f6ba1b6 0.0s => => naming to docker.io/acore/ac-wotlk-worldserver:master 0.0s => CACHED [ac-worldserver build 1/8] RUN apt-get update && apt-get install -y --no-install-recommends build-essential ccache libtool cmake-data make cmake clang git lsb-base curl unzip default-mysql-client openssl 0.0s => [ac-db-import build 2/8] COPY CMakeLists.txt /azerothcore/CMakeLists.txt 0.5s => [ac-db-import build 3/8] COPY conf /azerothcore/conf 0.0s => [ac-db-import build 4/8] COPY deps /azerothcore/deps 0.2s => [ac-db-import build 5/8] COPY src /azerothcore/src 0.3s => [ac-db-import build 6/8] COPY modules /azerothcore/modules 0.0s => [ac-db-import build 7/8] WORKDIR /azerothcore/build 0.0s => [ac-db-import build 8/8] RUN --mount=type=cache,target=/ccache,sharing=locked --mount=type=bind,target=/azerothcore/.git,source=.git git config --global --add safe.directory /azerothcore && cmake /azerothcore -DCMAKE_INSTALL_PREFIX="/azerothcore/env/dist" -DAPPS_BUILD="all" 93.0s => CACHED [ac-worldserver runtime 1/4] RUN apt-get update && apt-get install -y --no-install-recommends libmysqlclient21 libreadline8 gettext-base default-mysql-client && rm -rf /var/lib/apt/lists/ 0.0s => CACHED [ac-db-import runtime 2/4] COPY --from=build /azerothcore/env/dist/etc/ /azerothcore/env/ref/etc 0.0s => CACHED [ac-db-import runtime 3/4] RUN groupadd --gid "1000" "acore" && useradd -d /azerothcore --uid "1000" --gid "1000" "acore" && passwd -d "acore" && chown -R "acore:acore" /azerothcore 0.0s => [ac-db-import runtime 4/4] COPY --chown=1000:1000 --chmod=755 apps/docker/entrypoint.sh /azerothcore/entrypoint.sh 0.0s => [ac-db-import db-import 1/2] COPY --chown=acore:acore data data 2.0s => [ac-db-import db-import 2/2] COPY --chown=acore:acore --from=build /azerothcore/env/dist/bin/dbimport /azerothcore/env/dist/bin/dbimport 0.1s => [ac-authserver internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [ac-authserver internal] load .dockerignore 0.0s => => transferring context: 35B 0.0s => [ac-worldserver internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 32B 0.0s => [ac-authserver internal] load build context 0.5s => => transferring context: 188.12kB 0.5s => [ac-worldserver internal] load .dockerignore 0.0s => => transferring context: 35B 0.0s => [ac-worldserver internal] load build context 1.6s => => transferring context: 215.57MB 1.6s => CACHED [ac-authserver build 2/8] COPY CMakeLists.txt /azerothcore/CMakeLists.txt 0.0s => CACHED [ac-authserver build 3/8] COPY conf /azerothcore/conf 0.0s => CACHED [ac-authserver build 4/8] COPY deps /azerothcore/deps 0.0s => CACHED [ac-authserver build 5/8] COPY src /azerothcore/src 0.0s => CACHED [ac-authserver build 6/8] COPY modules /azerothcore/modules 0.0s => CACHED [ac-authserver build 7/8] WORKDIR /azerothcore/build 0.0s => CACHED [ac-authserver build 8/8] RUN --mount=type=cache,target=/ccache,sharing=locked --mount=type=bind,target=/azerothcore/.git,source=.git git config --global --add safe.directory /azerothcore && cmake /azerothcore -DCMAKE_INSTALL_PREFIX="/azerothcore/env/dist" -DAPPS_BUILD="all" 0.0s => CACHED [ac-authserver runtime 2/4] COPY --from=build /azerothcore/env/dist/etc/ /azerothcore/env/ref/etc 0.0s => CACHED [ac-authserver runtime 3/4] RUN groupadd --gid "1000" "acore" && useradd -d /azerothcore --uid "1000" --gid "1000" "acore" && passwd -d "acore" && chown -R "acore:acore" /azerothcore 0.0s => CACHED [ac-authserver runtime 4/4] COPY --chown=1000:1000 --chmod=755 apps/docker/entrypoint.sh /azerothcore/entrypoint.sh 0.0s => [ac-authserver authserver 1/1] COPY --chown=acore:acore --from=build /azerothcore/env/dist/bin/authserver /azerothcore/env/dist/bin/authserver 0.1s => CACHED [ac-worldserver build 2/8] COPY CMakeLists.txt /azerothcore/CMakeLists.txt 0.0s => [ac-worldserver build 3/8] COPY conf /azerothcore/conf 0.1s => [ac-worldserver build 4/8] COPY deps /azerothcore/deps 0.2s => [ac-worldserver build 5/8] COPY src /azerothcore/src 0.3s => [ac-worldserver build 6/8] COPY modules /azerothcore/modules 0.0s => [ac-worldserver build 7/8] WORKDIR /azerothcore/build 0.0s => [ac-worldserver build 8/8] RUN --mount=type=cache,target=/ccache,sharing=locked --mount=type=bind,target=/azerothcore/.git,source=.git git config --global --add safe.directory /azerothcore && cmake /azerothcore -DCMAKE_INSTALL_PREFIX="/azerothcore/env/dist" -DAPPS_BUILD="all" 97.7s => CACHED [ac-worldserver runtime 2/4] COPY --from=build /azerothcore/env/dist/etc/ /azerothcore/env/ref/etc 0.0s => CACHED [ac-worldserver runtime 3/4] RUN groupadd --gid "1000" "acore" && useradd -d /azerothcore --uid "1000" --gid "1000" "acore" && passwd -d "acore" && chown -R "acore:acore" /azerothcore 0.0s => CACHED [ac-worldserver runtime 4/4] COPY --chown=1000:1000 --chmod=755 apps/docker/entrypoint.sh /azerothcore/entrypoint.sh 0.0s => [ac-worldserver worldserver 1/1] COPY --chown=acore:acore --from=build /azerothcore/env/dist/bin/worldserver /azerothcore/env/dist/bin/worldserver 0.5s [+] Running 3/5 ✔ Container ac-database Healthy 6.1s ✔ Container ac-client-data-init Started 0.5s ✘ Container ac-db-import service "ac-db-import" didn't complete successfully: exit 1 6.5s ⠙ Container ac-authserver Created 209.1s ⠙ Container ac-worldserver Created 209.1s
and
docker logs ac-db-import
Starting dbimport... AzerothCore rev. 77e1062c4bd9+ 2024-03-04 09:34:52 -0300 (master branch) (Unix, RelWithDebInfo, Static) (dbimport)