mirror of
https://github.com/itzg/docker-minecraft-server.git
synced 2024-06-07 19:40:43 +00:00
44 lines
854 B
Bash
Executable File
44 lines
854 B
Bash
Executable File
#!/bin/bash
|
|
|
|
export TARGET
|
|
|
|
set -euo pipefail
|
|
|
|
apt-get update
|
|
|
|
DEBIAN_FRONTEND=noninteractive \
|
|
apt-get install -y \
|
|
imagemagick \
|
|
file \
|
|
gosu \
|
|
sudo \
|
|
net-tools \
|
|
iputils-ping \
|
|
curl \
|
|
git \
|
|
git-lfs \
|
|
jq \
|
|
dos2unix \
|
|
mysql-client \
|
|
tzdata \
|
|
rsync \
|
|
nano \
|
|
unzip \
|
|
zstd \
|
|
lbzip2 \
|
|
nfs-common \
|
|
libpcap0.8 \
|
|
webp
|
|
|
|
apt-get clean
|
|
|
|
# Patched knockd
|
|
curl -fsSL -o /tmp/knock.tar.gz https://github.com/Metalcape/knock/releases/download/0.8.1/knock-0.8.1-$TARGET.tar.gz
|
|
tar -xf /tmp/knock.tar.gz -C /usr/local/ && rm /tmp/knock.tar.gz
|
|
ln -s /usr/local/sbin/knockd /usr/sbin/knockd
|
|
setcap cap_net_raw=ep /usr/local/sbin/knockd
|
|
find /usr/lib -name 'libpcap.so.0.8' -execdir cp '{}' libpcap.so.1 \;
|
|
|
|
# Set git credentials
|
|
echo -e "[user]\n name = Minecraft Server on Docker\n email = server@example.com" >> /etc/gitconfig
|