Skip to content

Commit

Permalink
contributing: update guide for non-Linux (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabivlj authored Sep 25, 2024
1 parent 711a7b9 commit ff2b3b8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
## Running the registry


Running the registry is done via `wrangler dev`

```bash
Expand All @@ -13,17 +12,27 @@ You can `docker login` locally for running a push
$ docker login localhost:8787 # Or the URL that your worker is listening in
```

Note: If you are running Docker desktop in MacOS/Windows, you should add the following to the docker daemon configuration:

```json
{
"insecure-registries": ["host.docker.internal:8787"]
}
```

By default in a local environment, the registry uses USERNAME=hello and PASSWORD=world. See `wrangler.toml` for more details.

Tag any image that you have locally and push it:

This allows you to instead of using localhost, you are able to use host.docker.internal to access local registries.

```bash
$ docker tag my-image:local docker tag localhost:8787/my-image:local && docker push localhost:8787/my-image:local
```

## Testing

Test the registry with unit tests by running `vitest` with `miniflare 2`.
Test the registry with unit tests by running `vitest` with `miniflare 3`.

```bash
$ pnpm test
Expand Down

0 comments on commit ff2b3b8

Please sign in to comment.