WIP: Dodaj wsparcie dla Dockera #128

Draft
d33tah wants to merge 44 commits from d33tah/rentgen:develop into develop
2 changed files with 33 additions and 0 deletions
Showing only changes of commit a06bb028a7 - Show all commits

View File

@ -14,6 +14,14 @@
# Run commands in the container:
# docker run --rm rentgen npm run build:chrome
# docker run --rm rentgen npm run typecheck
#
# Run extension in Firefox (headless):
# docker build --target runtime -t rentgen-run .
# docker run --rm -it rentgen-run
#
# Using docker-compose:
# docker-compose up rentgen_check # Build only
# docker-compose up rentgen_run # Run in Firefox
# Build stage
FROM node:lts AS builder
@ -57,3 +65,18 @@ FROM builder
# Default command shows the built artifact
CMD ["ls", "-lh", "/app/web-ext-artifacts/"]
# Runtime stage - for running extension in Firefox
FROM builder AS runtime
# Install Firefox and Xvfb for headless execution
RUN apt-get update && apt-get install -y \
firefox-esr \
xvfb \
&& rm -rf /var/lib/apt/lists/*
# Set display for Xvfb
ENV DISPLAY=:99
# Start Xvfb and run extension in Firefox
CMD Xvfb :99 -screen 0 1024x768x24 & npm run ext-test

10
compose.yml Normal file
View File

@ -0,0 +1,10 @@
services:
rentgen_check:
build: .
rentgen_run:
build:
context: .
target: runtime
stdin_open: true
tty: true