Merge pull request #2 from Bl4ckSpr4y/samp

Samp
This commit is contained in:
Michael (Parker) Parker 2018-02-25 14:21:10 -05:00 committed by GitHub
commit e34921a403
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM ubuntu:16.04
MAINTAINER mrkrabs, <bl4ckspr4y@protonmail.com>
RUN apt update \
&& apt upgrade -y \
&& apt install -y libstdc++6 lib32stdc++6 tar curl iproute2 openssl \
&& useradd -d /home/container -m container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
COPY ./entrypoint.sh /entrypoint.sh
CMD ["/bin/bash", "/entrypoint.sh"]

11
entrypoint.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
sleep 3
cd /home/container
export INTERNAL_IP=`ip route get 1 | awk '{print $NF;exit}'`
MODIFIED_STARTUP=`eval echo $(echo ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g')`
echo ":/home/container$ ${MODIFIED_STARTUP}"
${MODIFIED_STARTUP}