Skip to content

Commit 25351a1

Browse files
committed
Implement container-based builds
We will now use containers to build everything. The container spec (Containerfile/Dockerfile) specify the base image, and each package is built independently inside of it.
1 parent 51fc30d commit 25351a1

29 files changed

+917
-568
lines changed

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/env bash
2+
13
eval "$(devenv direnvrc)"
24

35
use devenv

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ devenv.local.nix
2525

2626
# Output from Karsk
2727
output/
28+
venv

Dockerfile

Lines changed: 0 additions & 33 deletions
This file was deleted.

devenv.lock

Lines changed: 62 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,62 @@
1717
"type": "github"
1818
}
1919
},
20+
"flake-compat": {
21+
"flake": false,
22+
"locked": {
23+
"lastModified": 1767039857,
24+
"owner": "NixOS",
25+
"repo": "flake-compat",
26+
"rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab",
27+
"type": "github"
28+
},
29+
"original": {
30+
"owner": "NixOS",
31+
"repo": "flake-compat",
32+
"type": "github"
33+
}
34+
},
35+
"git-hooks": {
36+
"inputs": {
37+
"flake-compat": "flake-compat",
38+
"gitignore": "gitignore",
39+
"nixpkgs": [
40+
"nixpkgs"
41+
]
42+
},
43+
"locked": {
44+
"lastModified": 1774104215,
45+
"owner": "cachix",
46+
"repo": "git-hooks.nix",
47+
"rev": "f799ae951fde0627157f40aec28dec27b22076d0",
48+
"type": "github"
49+
},
50+
"original": {
51+
"owner": "cachix",
52+
"repo": "git-hooks.nix",
53+
"type": "github"
54+
}
55+
},
56+
"gitignore": {
57+
"inputs": {
58+
"nixpkgs": [
59+
"git-hooks",
60+
"nixpkgs"
61+
]
62+
},
63+
"locked": {
64+
"lastModified": 1762808025,
65+
"owner": "hercules-ci",
66+
"repo": "gitignore.nix",
67+
"rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c",
68+
"type": "github"
69+
},
70+
"original": {
71+
"owner": "hercules-ci",
72+
"repo": "gitignore.nix",
73+
"type": "github"
74+
}
75+
},
2076
"nixpkgs": {
2177
"inputs": {
2278
"nixpkgs-src": "nixpkgs-src"
@@ -56,10 +112,14 @@
56112
"root": {
57113
"inputs": {
58114
"devenv": "devenv",
59-
"nixpkgs": "nixpkgs"
115+
"git-hooks": "git-hooks",
116+
"nixpkgs": "nixpkgs",
117+
"pre-commit-hooks": [
118+
"git-hooks"
119+
]
60120
}
61121
}
62122
},
63123
"root": "root",
64124
"version": 7
65-
}
125+
}

devenv.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
languages.python = {
77
enable = true;
88
uv.enable = true;
9+
uv.sync.enable = true;
910
venv.enable = true;
1011
};
1112
}

examples/full/Containerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM registry.access.redhat.com/ubi8/ubi:latest
2+
3+
RUN dnf -y groupinstall "Development Tools"
4+
RUN dnf -y install which
5+
RUN dnf -y install python3.11
6+
RUN dnf -y install gcc-gfortran
7+
RUN dnf -y install git

examples/full/cirrus.config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
main-package: pflotran
22
entrypoint: bin/cirrus
3+
build-image: ./Containerfile
34

45
packages:
56
- name: petsc

examples/hello_world/Containerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
FROM alpine

examples/hello_world/config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
main-package: hello
22
entrypoint: bin/binary.sh
3+
build-image: Containerfile
34

45
packages:
56
- name: hello

0 commit comments

Comments
 (0)