first commit

This commit is contained in:
eroncero 2025-03-02 21:32:08 +01:00
parent 5a90c7664d
commit 9148f4d319
4 changed files with 42 additions and 0 deletions

2
2do.txt Normal file
View File

@ -0,0 +1,2 @@
# Compile as tibia user or chown.
# Copy otclient ..

8
app/build_otc.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
# Download and compile OTClient
cd /home/tibia
git clone "https://github.com/edubart/otclient.git"
cd otclient && mkdir build && cd build
cmake ..
make -j $(nproc)

15
app/build_physfs.sh Executable file
View File

@ -0,0 +1,15 @@
#!/bin/bash
# PHYSFS dependency
cd /app
git clone -b stable-3.0 "https://github.com/icculus/physfs.git"
cd physfs && mkdir build && cd build
cmake ..
make -j $(nproc)
sudo make install
#sudo cp /usr/local/lib/libphysfs.a /usr/lib/x86_64-linux-gnu/.
rm /usr/lib/x86_64-linux-gnu/libphysfs.a
sudo ln -s /usr/local/lib/libphysfs.a /usr/lib/x86_64-linux-gnu/libphysfs.a
cd ../..

17
dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM debian:bullseye
RUN apt-get update && apt-get full-upgrade -y && apt-get install -y git build-essential cmake libboost-all-dev libphysfs-dev libssl-dev liblua5.1-0-dev libglew-dev libvorbis-dev libopenal-dev zlib1g-dev sudo
WORKDIR /app
COPY app/build_physfs.sh /app
RUN useradd -m -s /bin/bash tibia && echo "tibia:tibia" | chpasswd
RUN /app/build_physfs.sh && chown -R tibia:tibia /home/tibia
COPY app/build_otc.sh /home/tibia
RUN su - tibia -c /home/tibia/build_otc.sh
USER tibia
ENTRYPOINT ["/bin/bash"]