Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contributing: update guide for non-Linux #49

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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