-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathDockerfile
38 lines (28 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM python:3.12-alpine
# Install dependencies, including su-exec
RUN apk update && apk add --no-cache ffmpeg su-exec
# Create appuser and appgroup
RUN addgroup -g 1000 appgroup && adduser -D -u 1000 -G appgroup appuser
# Set environment variables
ARG TUBETUBE_VERSION
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PYTHONPATH=/app/tubetube \
TUBETUBE_VERSION=${TUBETUBE_VERSION}
# Set the working directory
WORKDIR /app
# Copy the application code
COPY . .
# Install Python dependencies
RUN pip install --upgrade pip --root-user-action=ignore && \
pip install --no-cache-dir --root-user-action=ignore -r requirements.txt
# Ensure proper ownership of /config, /data and /temp directories
RUN mkdir -p /config /data /temp && \
chown -R appuser:appgroup /config /data /temp && \
chmod -R 775 /temp
# Make script executable
RUN chmod +x /app/start.sh
# Expose the application port
EXPOSE 6543
# Use the start script as the entrypoint
ENTRYPOINT ["/app/start.sh"]