Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions images/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,16 @@ MAINTAINER AshDev <ashdevfr@gmail.com>
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update -y; apt-get upgrade -y
RUN apt-get install -y software-properties-common
RUN apt-get install -y software-properties-common apt-utils
RUN add-apt-repository ppa:webupd8team/java -y
RUN apt-get install -y curl openjdk-8-jdk supervisor pwgen
RUN apt-get update && apt-get install -y wget git && apt-get clean all
RUN apt-get install -y curl \
openjdk-8-jdk \
supervisor \
pwgen \
sudo \
wget \
git
RUN apt-get clean all

ENV APP_NAME=server
#default directory for SPIGOT-server
Expand Down
31 changes: 25 additions & 6 deletions images/ubuntu/lib/scripts/spigot_init.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
set -e

echo "SPIGOT_HOME=$SPIGOT_HOME/"

# Change owner to minecraft.
if [ "$SKIPCHMOD" != "true" ]; then
sudo chown -R minecraft:minecraft $SPIGOT_HOME/
Expand Down Expand Up @@ -57,11 +59,20 @@ fi
# Select the spigot.jar for this particular rev.
rm -f $SPIGOT_HOME/spigot.jar && ln -s $SPIGOT_HOME/spigot-$REV.jar $SPIGOT_HOME/spigot.jar

# Avoid to be blacklisted by bukkit's cloudflare. Only redownload if asked.
if [ -z "$FORECEREBUILDBUKKIT" ]; then
REBUILD_BUKKIT=false
fi

# Install WorldBorder.
if [ -n "$WORLDBORDER" ]; then
if [ "$WORLDBORDER" = "true" ]; then
echo "Downloading WorldBorder..."
wget -O $SPIGOT_HOME/plugins/WorldBorder.jar https://dev.bukkit.org/projects/worldborder/files/latest
if [ ! -f $SPIGOT_HOME/plugins/WorldBorder.jar ] || [ "$REBUILD_BUKKIT" = "true" ]; then
echo "Downloading WorldBorder..."
wget -O $SPIGOT_HOME/plugins/WorldBorder.jar https://dev.bukkit.org/projects/worldborder/files/latest
else
echo "Using preiviously downloaded WorldBorder..."
fi
else
echo "Removing WorldBorder..."
rm -f $SPIGOT_HOME/plugins/WorldBorder.jar
Expand Down Expand Up @@ -119,8 +130,12 @@ fi
# Install Clearlag.
if [ -n "$CLEARLAG" ]; then
if [ "$CLEARLAG" = "true" ]; then
echo "Downloading ClearLag..."
wget -O $SPIGOT_HOME/plugins/Clearlag.jar https://dev.bukkit.org/projects/clearlagg/files/latest
if [ ! -f $SPIGOT_HOME/plugins/Clearlag.jar ] || [ "$REBUILD_BUKKIT" = "true" ]; then
echo "Downloading ClearLag..."
wget -O $SPIGOT_HOME/plugins/Clearlag.jar https://dev.bukkit.org/projects/clearlagg/files/latest
else
echo "Using preiviously downloaded ClearLag..."
fi
else
echo "Removing Clearlag..."
rm -f $SPIGOT_HOME/plugins/Clearlag.jar
Expand All @@ -130,8 +145,12 @@ fi
# Install PermissionsEx.
if [ -n "$PERMISSIONSEX" ]; then
if [ "$PERMISSIONSEX" = "true" ]; then
echo "Downloading PermissionsEx..."
wget -O $SPIGOT_HOME/plugins/PermissionsEx.jar https://dev.bukkit.org/projects/permissionsex/files/latest
if [ ! -f $SPIGOT_HOME/plugins/PermissionsEx.jar ] || [ "$REBUILD_BUKKIT" = "true" ]; then
echo "Downloading PermissionsEx..."
wget -O $SPIGOT_HOME/plugins/PermissionsEx.jar https://dev.bukkit.org/projects/permissionsex/files/latest
else
echo "Using preiviously downloaded PremissionsEx..."
fi
else
echo "Removing PermissionsEx..."
rm -f $SPIGOT_HOME/plugins/PermissionsEx.jar
Expand Down