forked from Qsgs-Fans/FreeKill
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
以及emo公主的判定小卡换图 --------- Co-authored-by: seven <[email protected]>
- Loading branch information
1 parent
e840a3b
commit 9dd4f55
Showing
18 changed files
with
276 additions
and
44 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
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,25 +1,29 @@ | ||
FROM debian | ||
USER root | ||
|
||
FROM linuxcontainers/debian-slim:latest | ||
|
||
# install dependencies | ||
RUN apt update -y && apt upgrade -y && \ | ||
apt install -y \ | ||
gcc g++ cmake \ | ||
liblua5.4-dev libsqlite3-dev libreadline-dev libssl-dev libgit2-dev swig qt6-base-dev qt6-tools-dev-tools \ | ||
gosu && \ | ||
apt clean -y && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# prepare source code | ||
COPY . /FreeKill | ||
|
||
#update apt dependencies | ||
RUN apt update -y && apt upgrade -y | ||
|
||
#install compile tools | ||
RUN apt install -y gcc g++ cmake | ||
RUN apt install -y liblua5.4-dev libsqlite3-dev libreadline-dev libssl-dev libgit2-dev swig qt6-base-dev qt6-tools-dev-tools | ||
|
||
#change workdir to FreeKill | ||
WORKDIR /FreeKill | ||
# compile and install | ||
RUN mkdir -p /FreeKill/build && \ | ||
cd /FreeKill/build && cp -r /usr/include/lua5.4/* ../include && cmake .. -DFK_SERVER_ONLY= && make && \ | ||
cd /FreeKill && cmake --install build --config Release && \ | ||
cp /FreeKill/docker/docker-entrypoint.sh / && chmod +x /docker-entrypoint.sh && \ | ||
mkdir /data && \ | ||
cd / && rm -rf /FreeKill | ||
|
||
#compile source code | ||
RUN mkdir build && cd build && cp -r /usr/include/lua5.4/* ../include && cmake .. -DFK_SERVER_ONLY= | ||
RUN cd build && make | ||
|
||
#build soft link | ||
RUN ln -s build/FreeKill | ||
WORKDIR /data | ||
|
||
EXPOSE 9527 | ||
|
||
ENTRYPOINT ["/FreeKill/FreeKill", "-s"] | ||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
CMD ["FreeKill", "-s"] |
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
USER_ID=${LOCAL_USER_ID:-1000} | ||
|
||
if [ "${1#-}" != "$1" ]; then | ||
set -- FreeKill -s "$@" | ||
fi | ||
|
||
if [ "$1" = 'FreeKill' -a "$(id -u)" = '0' ]; then | ||
id -u freekill >&/dev/null | ||
if [ $? -ne 0 ]; then | ||
useradd --shell /bin/bash -u $USER_ID -o -c "" -m freekill | ||
usermod -aG root freekill | ||
export HOME=/home/freekill | ||
mkdir -p $HOME/.local/share | ||
ln -s /data $HOME/.local/share/FreeKill | ||
chown -R freekill:freekill $HOME | ||
if [ ! -d "/data/server" ]; then | ||
cp -r /usr/local/share/FreeKill/server /data | ||
fi | ||
if [ ! -d "/data/packages" ]; then | ||
cp -r /usr/local/share/FreeKill/packages /data | ||
fi | ||
fi | ||
chown -R freekill /data | ||
exec gosu freekill "$0" "$@" | ||
fi | ||
|
||
exec "$@" |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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
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
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
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
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
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
Oops, something went wrong.