/idris2-devcontainer

vscode devcontainer for idris2

Primary LanguageShellMIT LicenseMIT

idris2-devcontainer

Containers for idris2 development

How to use

  • You can run idris2 or pack from the "idris2" docker container:

    docker run --rm -it ghcr.io/xicesky/idris2:nightly-230701-ubuntu-22.04 idris2
    # or
    docker run --rm -it ghcr.io/xicesky/idris2:nightly-230701-ubuntu-22.04 pack repl
  • The devcontainer image can be used for your idris2 project, see for example my idris2-stuff repository. The .devcontainer directory contains the Dockerfile that uses this devcontainer and customizes it.

Published containers

  • ghcr.io/xicesky/idris2-base:ubuntu-22.04

    • Base container for building idris2

  • ghcr.io/xicesky/idris2:nightly-230701-ubuntu-22.04

    • Container with installed idris2 & pack

  • ghcr.io/xicesky/idris2-devcontainer:nightly-230701-ubuntu-22.04

Development

Requirements:

  • pre-commit (optional), install e.g. using pip install pre-commit

  • docker

  • bash

$ git clone git@github.com:xicesky/idris2-devcontainer.git
$ cd idris2-devcontainer
$ pre-commit install

Build the containers:
$ ./build-locally.sh

In order to push the containers, Visit create a personal access token on github and use that token in the following commands to log in to the github container registry:

Read github personal access token, the login using docker.
$ read -rs CR_PAT
$ echo $CR_PAT | docker login ghcr.io -u xicesky --password-stdin

Push the containers with:
$ ./push-local-builds.sh

Maintenance

Also, update pre-commit hooks from time to time:
$ pre-commit autoupdate
$ pre-commit run --all-files
$ git add -A && git commit -m "Update pre-commit hooks"