Skip to content

Commit

Permalink
Use smaller base image
Browse files Browse the repository at this point in the history
Change Base Image to Python:3.11-Alpine
  • Loading branch information
TheWicklowWolf authored Nov 6, 2023
1 parent 9f4500f commit 76c1479
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
FROM python:3.11-slim
FROM python:3.11-alpine
# 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
RUN addgroup -g $GID general_user && \
adduser -D -u $UID -G general_user -s /bin/sh general_user
# Install ffmpeg
RUN apt-get update && apt-get install -y \
ffmpeg && \
rm -rf /var/lib/apt/lists/*
RUN apk update && apk add --no-cache ffmpeg
# Create directories and set permissions
COPY . /channeltube
WORKDIR /channeltube
Expand All @@ -19,4 +16,4 @@ RUN chmod -R 777 /channeltube/downloads
RUN pip install -r requirements.txt
EXPOSE 5000
USER general_user
CMD ["gunicorn","src.ChannelTube:app", "-c", "gunicorn_config.py"]
CMD ["gunicorn","src.ChannelTube:app", "-c", "gunicorn_config.py"]

0 comments on commit 76c1479

Please sign in to comment.