-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjustfile
40 lines (31 loc) · 1.21 KB
/
justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
GHC_VERSION := "9.2.8"
TAG_VERSION := "v2"
# List all recipies
default:
just --list --unsorted
# Build docker image
build-image:
docker image build . -f Dockerfile -t ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}}{{TAG_VERSION}}
# Push image
push-image:
docker push ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}}{{TAG_VERSION}}
# Build nix image
build-nix-image:
nix-build -v ghc-musl.nix
# Load nix image
load-nix-image:
docker load < result
# Test image
test-image:
docker run --rm --tty ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}}{{TAG_VERSION}} ghc --version
docker run --rm --tty ghcr.io/fpco/alpine-haskell-stack:{{GHC_VERSION}}{{TAG_VERSION}} stack --version
# Build ghc based image
build-ghc-image:
docker image build . -f ghc-Dockerfile -t ghcr.io/fpco/alpine-haskell-stack:ghc-{{GHC_VERSION}}{{TAG_VERSION}}
# Push ghc image
push-ghc-image:
docker push ghcr.io/fpco/alpine-haskell-stack:ghc-{{GHC_VERSION}}{{TAG_VERSION}}
# Test image
test-ghc-image:
docker run --rm --tty ghcr.io/fpco/alpine-haskell-stack:ghc-{{GHC_VERSION}}{{TAG_VERSION}} ghc --version
docker run --rm --tty ghcr.io/fpco/alpine-haskell-stack:ghc-{{GHC_VERSION}}{{TAG_VERSION}} stack --version