Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- 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"]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement