<commit_before># dockerfile-fedora-chromium

## Building it

```bash
docker build --tag=fedora-chromium .
```

## Running it

```
docker run \
    --net host \
    --cpuset 0 \
    --memory 512mb \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e DISPLAY=$DISPLAY \
    --name chromium \
    -e XAUTHORITY=/.Xauthority \
    -v ~/.Xauthority:/.Xauthority:ro \
    fedora-chromium
```


 * `--net host` — use host's network stack
 * `--cpuset 0` — one core is just enough
 * `--memory 512mb` — that should be enough
 * `-v /tmp/.X11-unix:/tmp/.X11-unix` — bindmount X socket
 * `-e DISPLAY=$DISPLAY` — connect to proper display
 * `-e XAUTHORITY=/.Xauthority -v ~/.Xauthority:/.Xauthority:ro` — X auth stuff
 * `--privileged` — get access to /dev
<commit_msg>improve readme<commit_after># dockerfile-fedora-chromium

## Building it

```bash
docker build --tag=fedora-chromium .
```

## Running it

```
docker run \
    --net host \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e DISPLAY=$DISPLAY \
    -e XAUTHORITY=/.Xauthority \
    -v ~/.Xauthority:/.Xauthority:ro \
    --name chromium \
    fedora-chromium
```

### Required
 * `--net host` — use host's network stack, otherwise you'll see:
```
[1:1:0327/114315:ERROR:browser_main_loop.cc(210)] Gtk: cannot open display: :0.0
```
 * `-v /tmp/.X11-unix:/tmp/.X11-unix` — bindmount X socket
 * `-e DISPLAY=$DISPLAY` — connect to proper display
 * `-e XAUTHORITY=/.Xauthority -v ~/.Xauthority:/.Xauthority:ro` — X auth stuff
 * `-v ~/.Xauthority:/.Xauthority:ro` — again, X auth stuff

### Optional
 * `--cpuset 0` — one core is just enough
 * `--memory 512mb` — that should be enough
 * -v $HOME/Downloads:/home/chromium/Downloads — get access to `Downloads` dir in your profile
 * -v $HOME/.config/chromium/:/home/chromium/.config/chromium\ — preserve runtime configuration
 * -v /dev/snd:/dev/snd --privileged — sound


This is heavily inspired by [<NAME>'s blog post](https://blog.jessfraz.com/posts/docker-containers-on-the-desktop.html).
{'fraction_non_alphanumeric': 0.1763819095477387, 'fraction_numerical': 0.022613065326633167, 'mean_word_length': 2.8962818003913893, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '431281', 'n_tokens_mistral': 800, 'n_tokens_neox': 728, 'n_words': 196}