2023-03-22 01:12:21 +00:00
|
|
|
#!/bin/bash
|
2022-02-12 03:00:24 +00:00
|
|
|
|
2023-03-21 18:37:55 +00:00
|
|
|
export TARGET
|
|
|
|
|
2023-03-22 01:12:21 +00:00
|
|
|
set -euo pipefail
|
2022-02-12 03:00:24 +00:00
|
|
|
|
|
|
|
apt-get update
|
|
|
|
|
|
|
|
DEBIAN_FRONTEND=noninteractive \
|
|
|
|
apt-get install -y \
|
|
|
|
imagemagick \
|
|
|
|
file \
|
|
|
|
gosu \
|
|
|
|
sudo \
|
|
|
|
net-tools \
|
|
|
|
iputils-ping \
|
|
|
|
curl \
|
|
|
|
git \
|
2024-04-17 13:11:04 +00:00
|
|
|
git-lfs \
|
2022-02-12 03:00:24 +00:00
|
|
|
jq \
|
|
|
|
dos2unix \
|
|
|
|
mysql-client \
|
|
|
|
tzdata \
|
|
|
|
rsync \
|
|
|
|
nano \
|
|
|
|
unzip \
|
|
|
|
zstd \
|
2022-05-27 03:02:26 +00:00
|
|
|
lbzip2 \
|
2023-03-12 18:40:35 +00:00
|
|
|
nfs-common \
|
2023-05-03 14:00:27 +00:00
|
|
|
libpcap0.8 \
|
|
|
|
webp
|
2022-02-12 03:00:24 +00:00
|
|
|
|
2023-03-12 18:40:35 +00:00
|
|
|
apt-get clean
|
2023-03-21 18:37:55 +00:00
|
|
|
|
|
|
|
# Patched knockd
|
2023-03-22 01:12:21 +00:00
|
|
|
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
2023-03-21 18:37:55 +00:00
|
|
|
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
|
|
|
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
2024-02-03 04:23:07 +00:00
|
|
|
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
2023-03-21 18:37:55 +00:00
|
|
|
find /usr/lib -name 'libpcap.so.0.8' -execdir cp '{}' libpcap.so.1 \;
|
2024-04-17 13:11:04 +00:00
|
|
|
|
|
|
|
# Set git credentials
|
|
|
|
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|