Skip to content

Instantly share code, notes, and snippets.

@AliLogic
Last active January 23, 2021 17:50
Show Gist options
  • Save AliLogic/60c51b90728cb2467ab0fadb2fa0b02d to your computer and use it in GitHub Desktop.
Save AliLogic/60c51b90728cb2467ab0fadb2fa0b02d to your computer and use it in GitHub Desktop.
A docker file for building and running SA-MP server with sampctl
FROM ubuntu:xenial
##
# Add 32-bit architecture
##
RUN \
dpkg --add-architecture i386
##
# Update system
##
RUN \
apt-get update -y && \
apt-get upgrade -y
##
# Install various packages
##
RUN \
apt-get install -y \
build-essential \
git \
curl \
wget \
sudo
##
# Install sampctl
##
RUN \
mkdir -p /tmp/sampctl
RUN \
cd /tmp/sampctl/
RUN \
curl -q -O sampctl.tar.gz https://github.com/Southclaws/sampctl/releases/download/${SAMPCTL_VERSION}/sampctl_${SAMPCTL_VERSION}_linux_amd64.tar.gz
RUN \
tar -xzf sampctl.tar.gz -C /tmp/sampctl/files
RUN \
mkdir -p /tmp/sampctl/files
RUN \
mv /tmp/sampctl/files/sampctl /usr/local/bin
RUN \
rm -rf /tmp/sampctl
##
# Set workdir
##
WORKDIR /app
ADD . /app
##
# Ensure packages
##
RUN \
sampctl p ensure --update
##
# Build gamemode
##
RUN \
sudo sampctl p build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment