Skip to content

Commit 0edc272

Browse files
tlaurionmacpijan
authored andcommitted
Prepare nix based docker image to be bumped to v0.2.8 to include minimal changes to build Dasharo-EC
Signed-off-by: Thierry Laurion <insurgo@riseup.net>
1 parent f263fa2 commit 0edc272

3 files changed

Lines changed: 18 additions & 15 deletions

File tree

.circleci/config.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ commands:
4848
jobs:
4949
prep_env:
5050
docker:
51-
# Docker image: tlaurion/heads-dev-env:v0.2.7
52-
- image: tlaurion/heads-dev-env@sha256:5f890f3d1b6b57f9e567191695df003a2ee880f084f5dfe7a5633e3e8f937479
51+
# Docker image: tlaurion/heads-dev-env:v0.2.9
52+
- image: tlaurion/heads-dev-env@sha256:96f8f91c6464305c4a990d59f9ef93910c16c7fd0501a46b43b34a4600a368de
5353
resource_class: large
5454
working_directory: ~/heads
5555
steps:
@@ -124,8 +124,8 @@ jobs:
124124

125125
build_and_persist:
126126
docker:
127-
# Docker image: tlaurion/heads-dev-env:v0.2.7
128-
- image: tlaurion/heads-dev-env@sha256:5f890f3d1b6b57f9e567191695df003a2ee880f084f5dfe7a5633e3e8f937479
127+
# Docker image: tlaurion/heads-dev-env:v0.2.9
128+
- image: tlaurion/heads-dev-env@sha256:96f8f91c6464305c4a990d59f9ef93910c16c7fd0501a46b43b34a4600a368de
129129
resource_class: large
130130
working_directory: ~/heads
131131
parameters:
@@ -153,8 +153,8 @@ jobs:
153153

154154
build:
155155
docker:
156-
# Docker image: tlaurion/heads-dev-env:v0.2.7
157-
- image: tlaurion/heads-dev-env@sha256:5f890f3d1b6b57f9e567191695df003a2ee880f084f5dfe7a5633e3e8f937479
156+
# Docker image: tlaurion/heads-dev-env:v0.2.9
157+
- image: tlaurion/heads-dev-env@sha256:96f8f91c6464305c4a990d59f9ef93910c16c7fd0501a46b43b34a4600a368de
158158
resource_class: large
159159
working_directory: ~/heads
160160
parameters:
@@ -175,8 +175,8 @@ jobs:
175175

176176
save_cache:
177177
docker:
178-
# Docker image: tlaurion/heads-dev-env:v0.2.7
179-
- image: tlaurion/heads-dev-env@sha256:5f890f3d1b6b57f9e567191695df003a2ee880f084f5dfe7a5633e3e8f937479
178+
# Docker image: tlaurion/heads-dev-env:v0.2.9
179+
- image: tlaurion/heads-dev-env@sha256:96f8f91c6464305c4a990d59f9ef93910c16c7fd0501a46b43b34a4600a368de
180180
resource_class: large
181181
working_directory: ~/heads
182182
steps:

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -436,17 +436,19 @@ docker_hub_repo="tlaurion/heads-dev-env"
436436
# Update pinned packages to latest if needed, modify flake.nix as required
437437
nix flake update
438438
439-
# Commit flake changes
440-
git add flake.nix flake.lock
441-
git commit --signoff -m "Bump nix develop based docker image to $docker_version"
442-
439+
# Build new docker image with helper and uncommited changes to flake* files above
440+
./docker_local_dev.sh
441+
# OR
443442
# Verify reproducibility: ensure the local build matches (no further changes to flake files)
444443
nix develop --ignore-environment --command true
445-
446444
# Build the new Docker image
447445
nix build .#dockerImage
448446
docker load < result
449447
448+
# Commit flake changes
449+
git add flake.nix flake.lock
450+
git commit --signoff -m "Bump nix develop based docker image to $docker_version"
451+
450452
# Verify you can extract the digest (for fully reproducible builds, flake.nix/flake.lock must be committed)
451453
docker inspect --format='{{.Id}}' linuxboot/heads:dev-env
452454
@@ -471,6 +473,7 @@ sed -i "s|# Version: .*|# Version: $docker_version|" docker/DOCKER_REPRO_DIGEST
471473
# fresh "# Docker image: $docker_hub_repo:$docker_version" comment immediately above the
472474
# matching "- image: $docker_hub_repo@<digest>" line while preserving indentation.
473475
sed -i -e "/^[[:space:]]*# Docker image: /d" -e "/^[[:space:]]*- image: ${docker_hub_repo//\//\\/}@/ s|^\([[:space:]]*\)\(- image: ${docker_hub_repo//\//\\/}@\)|\\1# Docker image: $docker_hub_repo:$docker_version\n\\1\\2|" .circleci/config.yml
476+
sed -i "s|$prev_digest|$new_digest|" docker/DOCKER_REPRO_DIGEST .circleci/config.yml
474477
475478
# Commit the digest and config changes
476479
git add docker/DOCKER_REPRO_DIGEST .circleci/config.yml

docker/DOCKER_REPRO_DIGEST

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99
# sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
1010

1111
# Place the digest on the first non-comment line below (remove the leading '#')
12-
# Version: v0.2.7
13-
sha256:5f890f3d1b6b57f9e567191695df003a2ee880f084f5dfe7a5633e3e8f937479
12+
# Version: v0.2.9
13+
sha256:96f8f91c6464305c4a990d59f9ef93910c16c7fd0501a46b43b34a4600a368de

0 commit comments

Comments
 (0)