1
1
mirror of https://github.com/anoma/juvix.git synced 2025-01-05 22:46:08 +03:00
juvix/docker
Paul Cadman 54d6c28127
Update stack resolver to lts-20.12 (#1873)
* Fixes https://github.com/anoma/juvix/issues/1811

This PR updates:
* The CI workflows to use GHC 9.2.6
* The stack resolver to LTS-20.12
* The cabal.project to point to stackage LTS-20.12
* The linux static build CI to use alpine GHC 9.2.6

NB: You may need to install GHC 9.2.6 and run `cabal update` before
trying the build with `cabal`.
2023-03-06 10:10:56 +01:00
..
Dockerfile-ghc-alpine-9.2.5 Upgrade stack snapshot to use ghc-9.2.5 (#1621) 2022-12-02 10:04:56 +01:00
Dockerfile-ghc-alpine-9.2.6 Update stack resolver to lts-20.12 (#1873) 2023-03-06 10:10:56 +01:00
README.md Update stack resolver to lts-20.12 (#1873) 2023-03-06 10:10:56 +01:00

The GHC alpine image

We need this image to workaround an issue with the official GHC alpine binary, see https://gitlab.haskell.org/ghc/ghc/-/issues/20266

We use this image to make static linux binaries.

Building the image

The tag of the image should be prefixed by the location of the GitHub docker repository that you're pushing to. In this case the repository is ghcr.io/paulcadman.

docker build -t ghcr.io/paulcadman/ghc-alpine:9.2.6 -f Dockerfile-ghc-alpine-9.2.6 .

Authenticating with the GitHub Docker repository

First create a classic personal access token with repo and write:packages permissions.

Consult the GitHub documentation on how to do this:

https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-to-the-container-registry

Set the token to the variable CR_PAT and then authenticate:

echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin

NB: You do not substitue your username for USERNAME in the command above.

Testing the image

docker run -it --rm ghcr.io/paulcadman/ghc-alpine:9.2.6

Pushing the image

docker push ghcr.io/paulcadman/ghc-alpine:9.2.6