Skip to content

Latest commit

 

History

History
105 lines (71 loc) · 4.14 KB

README.md

File metadata and controls

105 lines (71 loc) · 4.14 KB

Idris 2 Docker

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)

Table of Contents

Motivation

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.

Images

Example Project

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 .

Usage

Devcontainer

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.

Command Line

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

Base Image

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

# ...

Running Locally

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.

Build Latest

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

Build From a Tagged Release/SHA commit

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

Credit