starbound-server/Dockerfile

54 lines
1.1 KiB
Docker

FROM didstopia/base:steamcmd-ubuntu-20.04
LABEL maintainer="Ezekiel Grave <gitea@reg.ici.de.com>"
# Fixes apt-get warnings
ARG DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && \
apt-get install -y \
--no-install-recommends net-tools && \
apt-get clean && \
dpkg --clear-avail && \
rm -rf /var/lib/apt/lists/*
# Create the volume directories
# Create and set the steamcmd folder as a volume
RUN mkdir -p /steamcmd/starbound
# Add the steamcmd installation script
ADD install.cmd /install.cmd
# Copy the startup script
ADD start.sh /app/start.sh
# Set the current working directory
WORKDIR /
# Fix permissions
RUN chown -R 1000:1000 \
/steamcmd \
/app
# Run as a non-root user by default
ENV PGID 1000
ENV PUID 1000
# Expose necessary ports
EXPOSE 21025/tcp
# Setup default environment variables for the server
ENV STEAM_USERNAME ""
ENV STEAM_PASSWORD ""
ENV SKIP_STEAMCMD ""
# Define directories to take ownership of
ENV CHOWN_DIRS "/app,/steamcmd"
# Expose the volumes
VOLUME [ "/app/steam", "/steamcmd/starbound" ]
# Start the server
CMD [ "bash", "/app/start.sh"]