yt-dlp / Dockerfile
GPT-free-api's picture
Update Dockerfile
6fe325f verified
raw
history blame contribute delete
868 Bytes
# Base image with Node.js
FROM node:20-buster
# Create work directory
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y \
git \
firefox-esr \
curl \
libx11-xcb1 \
libdbus-glib-1-2
# Clone the repository
RUN git clone https://github.com/libredirect/browser_extension
# Change to project directory
WORKDIR /app/browser_extension
# Install npm dependencies
RUN npm install
# Generate HTML files
RUN npm run html
# Expose necessary ports
EXPOSE 9222
# Add healthcheck
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s CMD curl --fail http://127.0.0.1:9222 || exit 1
# Start Firefox and web-ext
CMD /usr/bin/firefox-esr --headless --remote-debugging-port=9222 & \
sleep 10 && \
npx web-ext run --source-dir ./src --firefox /usr/bin/firefox-esr --firefox-args="--remote-debugging-port=9222" --verbose