Closed ToddRosenkrantz closed 3 years ago
This is caused by \sql\get_evedbtool.sh uses windows line breaker instead of unix, and we are running it under WSL, which uses unix line breaker. Try open that file using notepad++, you will see bottom right displays something like "windows". Right click it, and change it to "unix", save file, and try again.
I remember there's another file have similar problem. You can solve it via same method.
@windheaven The files themselves do not have Windows line endings in the repo. They were written on Linux. The reason they have Windows line endings is you cloned them using a git Windows client which therefore inserted them in the files for you.
The way to fix this is to clone them using a Linux version of git.
I have confirmed this by cloning the repo on Linux and checking the files with dos2unix.
Sounds like git core.autocrlf
is set to true
instead of false
therefore git client is auto converting line endings to Windows format (CRLF).
A repository fix would be to explicitly declare all *.sh files be LF via .gitattributes
:
# Have shell scripts always use LF line endings
*.sh text eol=lf
See the git documentation on .gitattributes
for more details: https://git-scm.com/docs/gitattributes
I understand the issue now. I will apply the changes to my files, verify and close the issue unless you want to close it by modifying the .gitattibutes file as above. That would be the cleanest resolution going forward as .sh files will probably never be run under a windows command prompt.
I've modified all the .sh files to use UNIX style line endings, using notepad++'s EOL conversion. The build completes properly and containers start.
Added suggested .gitattributes file and pull request. Closing this now
Error occurs while attempting to build the database server. It seems that files are not being copied to the appropriate directories for the build to complete successfully .
D:\EveOnline_EMU\evemu_Crucible>docker-compose -p evemu up --build -d Docker Compose is now in the Docker CLI, try
docker compose up
Building server [+] Building 0.7s (21/21) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.74kB 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 34B 0.0s => [internal] load metadata for quay.io/fedora/fedora:33-x86_64 0.3s => [base 1/2] FROM quay.io/fedora/fedora:33-x86_64@sha256:5cee13d8f2f6e1039d690e9239d08d933f71f6e35986a9aea41380 0.0s => [internal] load build context 0.1s => => transferring context: 63.76kB 0.0s => CACHED [base 2/2] RUN dnf groupinstall -y "Development Tools" && dnf install -y cmake git zlib-devel mariadb- 0.0s => CACHED [app-build 1/11] ADD CMakeLists.txt /src/ 0.0s => CACHED [app-build 2/11] ADD config.h.in /src/ 0.0s => CACHED [app-build 3/11] ADD /cmake/ /src/cmake 0.0s => CACHED [app-build 4/11] ADD /dep/ /src/dep 0.0s => CACHED [app-build 5/11] ADD /src/ /src/src 0.0s => CACHED [app-build 6/11] ADD /utils/ /src/utils 0.0s => CACHED [app-build 7/11] RUN mkdir -p /src/build /app /app/logs /app/server_cache /app/image_cache 0.0s => CACHED [app-build 8/11] WORKDIR /src/build 0.0s => CACHED [app-build 9/11] RUN cmake -DCMAKE_INSTALL_PREFIX=/app -DCMAKE_BUILD_TYPE=Debug .. 0.0s => CACHED [app-build 10/11] RUN make -j$(nproc) 0.0s => CACHED [app-build 11/11] RUN make install 0.0s => CACHED [app 1/4] COPY --from=app-build /src/utils/ /src/utils 0.0s => CACHED [app 2/4] ADD /sql/ /src/sql 0.0s => CACHED [app 3/4] COPY --from=app-build /app/ /app 0.0s => ERROR [app 4/4] RUN cd /src/sql && ./get_evedbtool.sh 0.3s
after cloning repository,
cd evemu_Crucible docker-compose -p evemu up --build -d
Container should start
System Details (please complete the following information):
Additional context commenting out "RUN cd /src/sql && ./get_evedbtool.sh" allows the container to build. "docker exec -it -u root evemu_db_1 /bin/bash" will allow one to examine the container contents, there is no /src directory