From 13811994a8e58344252cb6d92462630f2029dd6c Mon Sep 17 00:00:00 2001 From: Sable no <72171476+Sable-20@users.noreply.github.com> Date: Thu, 15 Apr 2021 20:39:26 -0400 Subject: [PATCH] Updated Dockerfile I updated the dockerfile to actually work and now it has security shit going on as well i dont know someone proved it but i wasnt listening. it also accepts arguments properly and has a default argument in case they dont provide anything. --- Dockerfile | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7920d14..c0f1769 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,29 @@ -FROM python:alpine3.13 +FROM python:buster -RUN mkdir /app -WORKDIR /app -COPY . /app +LABEL version="0.0.1-dev" \ + author="RoninNakomoto (https://github/com/RoninNakomoto)" \ + docker_build="docker build -t sublister ." \ + docker_run_basic="docker run --rm sublister -h" -RUN /usr/local/bin/python -m pip install --upgrade pip -RUN /usr/local/bin/python --version +RUN mkdir /Sublister2 -RUN pip3 install --no-cache-dir -r requirements.txt -RUN chmod +x ./*.py -ENTRYPOINT [ "/app/sublist3r2.py" ] \ No newline at end of file +COPY [".", "/Sublist3r2"] + +ENV PATH=${PATH}:/Sublist3r2 + +RUN apt-get update && \ + apt-get install -y build-essential libffi-dev libgit2-dev && \ + pip install -r /Sublist3r2/requirements.txt && \ + addgroup Sublist3r2 --force-badname && \ + useradd -g Sublist3r2 -d /Sublist3r2 -s /bin/sh Sublist3r2 && \ + chown -R Sublist3r2:Sublist3r2 /Sublist3r2 && \ + export RANDOM_PASSWORD=$(tr -dc A-Za-z0-9