Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWicklowWolf authored Nov 3, 2023
1 parent 0d6dbc3 commit 9f4500f
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
FROM python:3.11-slim
# Create User
ARG UID=1000
ARG GID=1000
RUN groupadd -g $GID general_user && \
useradd -m -u $UID -g $GID -s /bin/bash general_user
RUN umask 0000
# Install ffmpeg
RUN apt-get update && apt-get install -y \
ffmpeg \
&& rm -rf /var/lib/apt/lists/*
ffmpeg && \
rm -rf /var/lib/apt/lists/*
# Create directories and set permissions
COPY . /channeltube
WORKDIR /channeltube
RUN mkdir -p /channeltube/downloads
RUN chown -R $UID:$GID /channeltube
RUN chmod -R 777 /channeltube/downloads
# Install requirements and run code as general_user
RUN pip install -r requirements.txt
EXPOSE 5000
USER general_user
CMD ["gunicorn","src.ChannelTube:app", "-c", "gunicorn_config.py"]

0 comments on commit 9f4500f

Please sign in to comment.