Last active
May 23, 2017 22:00
-
-
Save fakuivan/e168bbe35ee3e93b000e71cfdbd71c6e to your computer and use it in GitHub Desktop.
A complete (but w/o mysql and only the tf2 sdk) docker build environment for compiling sourcemod (1.8-dev branch) and its extensions, controlled by SSH.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu | |
RUN apt update && apt upgrade -y && \ | |
apt install -y git \ | |
lib32stdc++6 \ | |
lib32z1-dev \ | |
libc6-dev-i386 \ | |
linux-libc-dev \ | |
lib32gcc-5-dev \ | |
libgcc-5-dev \ | |
g++-5-multilib \ | |
gcc-5-multilib \ | |
g++-5 \ | |
gcc-5 \ | |
python3 \ | |
\ | |
openssh-server \ | |
python3-pip && \ | |
mkdir /var/run/sshd && chmod 0755 /var/run/sshd | |
RUN sed -i "s/.*RSAAuthentication.*/RSAAuthentication yes/g" /etc/ssh/sshd_config && \ | |
sed -i "s/.*PubkeyAuthentication.*/PubkeyAuthentication yes/g" /etc/ssh/sshd_config && \ | |
sed -i "s/.*PasswordAuthentication.*/PasswordAuthentication no/g" /etc/ssh/sshd_config && \ | |
sed -i "s/.*AuthorizedKeysFile.*/AuthorizedKeysFile\t\.ssh\/authorized_keys/g" /etc/ssh/sshd_config && \ | |
sed -i "s/.*PermitRootLogin.*/PermitRootLogin no/g" /etc/ssh/sshd_config | |
#Supply your own public key for authenticating | |
ADD id.pub /tmp/id.pub | |
RUN useradd -U -d /home/build -s /bin/bash build && \ | |
mkdir /home/build && chown build:build /home/build && \ | |
su build -c bash -c "mkdir /home/build/.ssh/ && \ | |
cat /tmp/id.pub > /home/build/.ssh/authorized_keys" | |
RUN su build -c bash -c \ | |
"git clone --branch 1.8-dev --recursive https://github.com/alliedmodders/sourcemod /home/build/sourcemod && \ | |
git clone --branch tf2 https://github.com/alliedmodders/hl2sdk /home/build/hl2sdk-tf2 && \ | |
git clone --branch 1.10-dev https://github.com/alliedmodders/metamod-source /home/build/mmsource-1.10" && \ | |
git clone https://github.com/alliedmodders/ambuild /tmp/ambuild | |
RUN cd /tmp/ambuild && python3 setup.py install | |
EXPOSE 22 | |
CMD ["/usr/sbin/sshd", "-D"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment