From 8b2498642f1448a02320f189aa36b4181a2a8639 Mon Sep 17 00:00:00 2001 From: Jacek Wielemborek Date: Sat, 25 Oct 2025 20:06:09 +0200 Subject: [PATCH] docs(docker): move Dockerfile usage comments to README - Dockerfile header reduced to single line reference to README - Added comprehensive 'Docker Usage' section to README.md - Easier to maintain documentation in one place - Includes all usage examples: build, test, runtime, docker-compose --- Dockerfile | 24 +----------------------- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/Dockerfile b/Dockerfile index ba58371..62494cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,27 +1,5 @@ # Rentgen Browser Extension - Docker Build -# -# Usage: -# Build and extract artifacts directly: -# docker buildx build . --output artifacts -# -# Build with tests (typecheck + lint): -# docker build --build-arg RUN_TESTS=true -t rentgen . -# -# Or traditional build (creates full development environment): -# docker build -t rentgen . -# docker run --rm rentgen ls -lh /app/web-ext-artifacts/ -# -# 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 +# See README.md for detailed usage instructions # Build stage FROM node:lts AS builder diff --git a/README.md b/README.md index e168bed..113c361 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,50 @@ Firefox: https://addons.mozilla.org/en-US/firefox/addon/rentgen/ 3. Click _Load Temporary Add-on..._ button 4. Pick the zip archive from last step of build process. +## Docker Usage + +### Build and extract artifacts directly + +```bash +docker buildx build . --output artifacts +``` + +This will build the extension and extract the `.zip` file to the `artifacts/` directory. + +### Build with tests (typecheck + lint) + +```bash +docker build --build-arg RUN_TESTS=true -t rentgen . +``` + +### Traditional build (creates full development environment) + +```bash +docker build -t rentgen . +docker run --rm rentgen ls -lh /app/web-ext-artifacts/ +``` + +### Run commands in the container + +```bash +docker run --rm rentgen npm run build:chrome +docker run --rm rentgen npm run typecheck +``` + +### Run extension in Firefox (headless) + +```bash +docker build --target runtime -t rentgen-run . +docker run --rm -it rentgen-run +``` + +### Using docker-compose + +```bash +docker-compose up rentgen_check # Build only +docker-compose up rentgen_run # Run in Firefox +``` + ## Issue tracker If you find a problem, please send us an email: kontakt@internet-czas-dzialac.pl