Skip to content

Commit

Permalink
readme improvements; comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor committed Dec 17, 2024
1 parent 729ed6e commit 81e0c31
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pnpm changeset
```
And follow the instructions to create an appropriate changeset. Please ensure any contributions that touch code are accompanied by a changeset.

### Building all with Docker
### Building everything with Docker

You can also build the PGlite from scratch by just issuing a docker build command:

Expand All @@ -187,6 +187,19 @@ You can then use this image, for example, to run the tests:

`$ docker run pglitedocker bash -c "cd /workspace/packages/pglite && pnpm test"`

#### Extract build artifacts from the docker image

Following is an example of how you can extract the build artifacts created in the previous step:

```
$ container_id=$(docker create pglitedocker)
$ docker cp "$container_id:/tmp/pglite/sdk" /tmp/
$ docker cp "$container_id:/tmp/web/postgres.wasm" /tmp/
$ docker rm "$container_id"
```

This will copy the sdk build artifacts folder as well as the postgres.wasm binary to your local /tmp folder

## Acknowledgments

PGlite builds on the work of [Stas Kelvich](https://github.com/kelvich) of [Neon](https://neon.tech) in this [Postgres fork](https://github.com/electric-sql/postgres-wasm).
Expand Down
1 change: 1 addition & 0 deletions buildall.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ WORKDIR /workspace
COPY . .

RUN pnpm install
# runs the wasm build without spinning yet another docker instance that would produce them
RUN pnpm wasm:build-no-docker
RUN pnpm ts:build

0 comments on commit 81e0c31

Please sign in to comment.