Developing with Docker

    The developer loop when using Docker is substantially the same as if the tools had been installed directly.

    All the source files live in the prql directory on the host. As the source changes, the tools (running in the Docker container) can watch those directories and re-run so results are instantly visible.

    When the Docker container exits (say, at the end of the development session), the prql directory on the local machine contains the latest files. Use git to pull or to push the prql repo from the host as normal.

    Once Docker is installed, build the Docker image with the following commands.

    Optional: Install pre-commit on the machine that hosts Docker. It runs several to ensure code consistency. You can also configure to run pre-commit automatically for each commit with the second (one-time) command below.

    • There’ll be a root@xxxxxxxxx:/src/# prompt
    • Enter exit to stop the container

    Currently our Docker image only supports running Rust dependencies. (adding hugo & so that the playground can run would be a welcome contribution.)

    Use the docker run... command above, then enter the relevant commands; for example cargo insta test --accept or task run book — more details of the commands are in each component’s README.md file or our .

    Note: The first time you run a component, it may take some time to install additional files. Once they’re built, start up is quick.

    Add a label to the PR pr-test-all or to run these tests on a PR.