forked from icd/rentgen
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
This commit is contained in:
parent
b53aeccd8c
commit
8b2498642f
24
Dockerfile
24
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
|
||||
|
||||
44
README.md
44
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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user