Rework Dockerfile and run as user
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-01-06 11:19:13 +01:00
parent 60a9ec92b7
commit 68c61f40d3

View File

@ -2,19 +2,19 @@ FROM python:alpine
WORKDIR /usr/src/app WORKDIR /usr/src/app
COPY requirements.txt ./ COPY requirements.txt /usr/src/app/
RUN apk add --no-cache bash build-base capstone-dev && \ RUN apk add --no-cache bash build-base capstone-dev mandoc-doc man-db w3m youtube-dl aspell aspell-fr && \
pip install --no-cache-dir -r requirements.txt && \ pip install --no-cache-dir -r requirements.txt && \
pip install bs4 capstone dnspython pip install bs4 capstone dnspython && \
apk del build-base capstone-dev
WORKDIR /usr/src/app
VOLUME /var/lib/nemubot VOLUME /var/lib/nemubot
RUN apk add --no-cache mandoc-doc man-db w3m youtube-dl COPY . /usr/src/app/
COPY . . RUN ./setup.py install
WORKDIR /var/lib/nemubot
USER guest
ENTRYPOINT [ "python", "-m", "nemubot", "-d", "-P", "", "-M", "/usr/src/app/modules" ] ENTRYPOINT [ "python", "-m", "nemubot", "-d", "-P", "", "-M", "/usr/src/app/modules" ]
CMD [ "-D", "/var/lib/nemubot" ] CMD [ "-D", "/var/lib/nemubot" ]