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.
This commit is contained in:
Sable no 2021-04-15 20:39:26 -04:00 committed by GitHub
parent 93e4fa4341
commit 13811994a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 9 deletions

View File

@ -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" ]
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 </dev/urandom | head -c44) && \
echo "root:$RANDOM_PASSWORD" | chpasswd && \
unset RANDOM_PASSWORD && \
passwd -l root
USER Sublist3r2
ENTRYPOINT ["sublist3r2.py"]
CMD ["-h"]