Multi-arch, multi-distro Docker images for Idris 2, primarily aimed for devcontainers.
Architectures: amd64
, arm64
Idris Versions: v0.5.1
, v0.6.0
, v0.7.0
, latest
(Up to date with Idris2/main - recompiled daily)
Installing Idris2 is quite time consuming and not very intuitive, especially for Apple Silicon. That presents quite a bottleneck for new users. This project aims to provide a quick and easy way to get started with Idris2 without having to go through the entire process on your own machine.
- idris-2-docker/base - Base image with Idris2 installed from source.
- idris-2-docker/devcontainer - Includes Idris2 LSP
- idris-2-docker/ubuntu - Ubuntu 20.04
- idris-2-docker/debian - Debian bullseye
An example Hello World project taken from the Getting Started Guide can be found in example. It uses Idris 0.7.0. To start, clone this repo and open the example folder (not the root!) in VSCode.
git clone [email protected]:joshuanianji/idris-2-docker.git
cd idris-2-docker/example
code .
Add devcontainers to your own project by copying the following contents to Dockerfile
in the root of your project:
FROM ghcr.io/joshuanianji/idris-2-docker/devcontainer:v0.7.0
Then, using Microsoft's Remote SSH tools, click "Reopen in container" and choose that Dockerfile.
You can also run the image directly from the command line.
docker run -it --rm ghcr.io/joshuanianji/idris-2-docker/ubuntu:v0.5.1 idris2 --version
Idris 2, version 0.5.1
docker run -it --rm --entrypoint /bin/bash ghcr.io/joshuanianji/idris-2-docker/debian:v0.5.1
$ idris2 --version
You can also use one of the images as a base image for your own Dockerfile.
FROM ghcr.io/joshuanianji/idris-2-docker/debian:v0.5.1
# ...
To run the images locally, I recommend opening the workspace in the Devcontainer to provide a fully-featured development environment. I made a scripts/build-image.py
which can build the base, debian, ubuntu or devcontainer from an idris version or a SHA commit.
This is the default behaviour when running the script.
# builds base from latest commit on the Idris repo. Tag is base-latest
python scripts/build-image.py --image base
python scripts/build-image.py --image devcontainer --tag devcontainer-latest-test
python scripts/build-image.py --image base --version v0.6.0
python scripts/build-image.py --image base --sha 58e5d156621cfdd4c54df26abf7ac9620cfebdd8
python scripts/build-image.py --image devcontainer --version v0.6.0
- dgellow/idris-docker-image for giving me a starting point
- YBogomolov's Gist for Devcontainer pointers