|
|
|
FROM node:20-buster |
|
|
|
|
|
WORKDIR /app |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
git \ |
|
firefox-esr \ |
|
curl \ |
|
libx11-xcb1 \ |
|
libdbus-glib-1-2 |
|
|
|
|
|
RUN git clone https://github.com/libredirect/browser_extension |
|
|
|
|
|
WORKDIR /app/browser_extension |
|
|
|
|
|
RUN npm install |
|
|
|
|
|
RUN npm run html |
|
|
|
|
|
EXPOSE 9222 |
|
|
|
|
|
HEALTHCHECK --interval=10s --timeout=5s --start-period=30s CMD curl --fail http://127.0.0.1:9222 || exit 1 |
|
|
|
|
|
CMD /usr/bin/firefox-esr --headless --remote-debugging-port=9222 & sleep 5 && npx web-ext run --firefox /usr/bin/firefox-esr --firefox-profile /tmp/firefox-profile --verbose |
|
|