diff --git a/Jenkinsfile b/Jenkinsfile index 46f978e..7e96547 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,6 +21,7 @@ pipeline { #!/bin/bash docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine + docker build -t git.zontreck.com/ariascreations/yolks:debian base/debian ''' } } @@ -37,7 +38,7 @@ pipeline { #!/bin/bash docker push git.zontreck.com/ariascreations/yolks:alpine - + docker push git.zontreck.com/ariascreations/yolks:debian ''' } } diff --git a/base/debian/Dockerfile b/base/debian/Dockerfile new file mode 100644 index 0000000..17ce121 --- /dev/null +++ b/base/debian/Dockerfile @@ -0,0 +1,29 @@ +FROM debian:bookworm + + +LABEL author="Tara Piccari" maintainer="tarapiccari@gmail.com" +LABEL upstream="https://github.com/pelican-eggs/yolks" + +ENV DEBIAN_FRONTEND noninteractive +RUN useradd -m -d /home/container -s /bin/bash container + +RUN ln -s /home/container/ /nonexistent +ENV USER=container HOME=/home/container + +RUN apt-get update +RUN apt-get upgrade -y + +RUN apt install -y gcc g++ libgcc-12-dev libc++-dev gdb libc6 git wget curl tar zip unzip binutils xz-utils liblzo2-2 cabextract iproute2 net-tools netcat-traditional telnet libatomic1 libsdl1.2debian libsdl2-2.0-0 \ + libfontconfig1 icu-devtools libunwind8 libssl-dev sqlite3 libsqlite3-dev libmariadb-dev-compat libduktape207 locales ffmpeg gnupg2 apt-transport-https software-properties-common ca-certificates \ + liblua5.3-0 libz3-dev libzadc4 rapidjson-dev tzdata libevent-dev libzip4 libprotobuf32 libfluidsynth3 procps libstdc++6 build-essential + +RUN update-locale en_US.UTF-8 +RUN dpkg-reconfigure --frontend noninteractive locales + +WORKDIR /home/container +STOPSIGNAL SIGINT + +COPY --chown=container:container ./entrypoint.sh /entrypoint.sh +RUN chmod +x /entrypoint.sh +ENTRYPOINT ["/bin/bash", "-c", "--"] +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/base/debian/entrypoint.sh b/base/debian/entrypoint.sh new file mode 100644 index 0000000..8244bf9 --- /dev/null +++ b/base/debian/entrypoint.sh @@ -0,0 +1,13 @@ +#!/bin/bash +cd /home/container + +# Make internal Docker IP address available to processes. +INTERNAL_IP=$(ip route get 1 | awk '{print $(NF-2);exit}') +export INTERNAL_IP + +# Replace Startup Variables +MODIFIED_STARTUP=$(echo -e ${STARTUP} | sed -e 's/{{/${/g' -e 's/}}/}/g') +echo -e ":/home/container$ ${MODIFIED_STARTUP}" + +# Run the Server +eval ${MODIFIED_STARTUP} \ No newline at end of file diff --git a/build.sh b/build.sh index 5f37634..ae50df1 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,5 @@ #!/bin/bash -docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine \ No newline at end of file +docker build -t git.zontreck.com/ariascreations/yolks:alpine base/alpine +docker build -t git.zontreck.com/ariascreations/yolks:debian base/debian \ No newline at end of file