testhajs / Dockerfile
marriedtermiteblyi's picture
Update Dockerfile
54895ac verified
raw
history blame contribute delete
696 Bytes
FROM python:3.11-slim
USER root
WORKDIR /app
RUN apt-get update && apt-get install -y \
curl \
wget \
sudo \
ffmpeg \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 appuser && \
echo "appuser ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN pip install --no-cache-dir yt-dlp
COPY package*.json ./
RUN npm install
COPY . .
RUN mkdir -p downloads && \
chown -R appuser:appuser /app && \
chmod +x start.sh && \
chmod 777 downloads
USER appuser
EXPOSE 7860
ENV PORT=7860
CMD ["./start.sh"]