File size: 860 Bytes
8a4cdfe a8eb0c4 1b1dd01 8a4cdfe 1b1dd01 8a4cdfe 1b1dd01 8a4cdfe 1b1dd01 8a4cdfe 1b1dd01 8a4cdfe 1b1dd01 8a4cdfe 1b1dd01 8a4cdfe afbda33 8a4cdfe 6fe325f d6a29a9 |
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 |
# 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 --args="--remote-debugging-port=9222" --verbose
|