Skip to content

Commit bb4af46

Browse files
committed
Refactored Docker files to eliminate redundant code and redundant definitions of Docker image versions.
1 parent eb819b2 commit bb4af46

17 files changed

Lines changed: 58 additions & 165 deletions

.github/workflows/cargo-workflow.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ jobs:
128128
needs: [format, checks]
129129
strategy:
130130
matrix:
131-
branch: ["stable", "unstable", "snapshot"]
131+
branch: ["stable", "unstable", "bleeding-edge"]
132132
runs-on: ubuntu-${{ inputs.OS_VERS_MAX }}
133133
steps:
134134
- uses: actions/checkout@v7
@@ -137,7 +137,7 @@ jobs:
137137
toolchain: ${{ matrix.rust }}
138138
cache: false
139139
- run: |
140-
make docker.tests TSSFAPI_TEST_BRANCH=${{ matrix.branch }}
140+
make docker.tests RSTSS_BRANCH=${{ matrix.branch }}
141141
142142
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
143143
# Benchmarks

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ env_logger = "0.11.10"
3232
function_name = "0.3.0"
3333
hex = "0.4.3"
3434
memory-stats = "1.2.0"
35-
p256 = "=0.14.0-rc.12"
35+
p256 = "=0.14.0-rc.13"
3636
rand = "0.10.1"
3737
rand_chacha = "0.10.0"
3838
regex = "1.12.4"

tools/docker/build/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include rstss.mk
2+
13
.PHONY: all run down
24

35
all: down run

tools/docker/build/build.Dockerfile

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

tools/docker/build/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ services:
44
build:
55
build:
66
context: ./
7-
dockerfile: build.Dockerfile
7+
dockerfile: rstss.Dockerfile
88
args:
9-
BASE_VERSION: r29@sha256:c33d92b8bd58a5397cf6ca7af960a68658256209a3f05c7be89bd55fdf007b45
9+
IMAGE_VERSION_RSTSS: ${IMAGE_VERSION_RSTSS:?}
1010
volumes:
1111
- ../../../:/var/opt/rust/src:ro
1212
- out:/var/tmp/rust:rw
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Define default Rust-TSS2 base image version
2+
ARG IMAGE_VERSION_RSTSS=UNDEFINED
3+
4+
# Docker file for build-env
5+
FROM danieltrick/rust-tss2-docker@${IMAGE_VERSION_RSTSS}
6+
7+
# Default command
8+
CMD ["rebuild", "--release"]

tools/docker/build/rstss.mk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ifeq ($(filter-out stable,$(RSTSS_BRANCH)),)
2+
export IMAGE_VERSION_RSTSS := sha256:c33d92b8bd58a5397cf6ca7af960a68658256209a3f05c7be89bd55fdf007b45
3+
else ifeq ($(RSTSS_BRANCH),unstable)
4+
export IMAGE_VERSION_RSTSS := sha256:6e7f3de9c3b0298192a4db108d955cd203b360fd1fb40b5f6940c9e3ecf7cc0b
5+
else ifeq ($(RSTSS_BRANCH),bleeding-edge)
6+
export IMAGE_VERSION_RSTSS := sha256:5e02daff85e7678c6715db7b9c07e96d3117bf04e8ec7eaba4a8958181035017
7+
else
8+
$(error Unsupport RSTSS_BRANCH branch "$(RSTSS_BRANCH)" specified!)
9+
endif

tools/docker/swtpm/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
include swtpm.mk
2+
13
.PHONY: all up down
24

35
all: down up

tools/docker/swtpm/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ services:
66
context: ./
77
dockerfile: swtpm.Dockerfile
88
args:
9-
BASE_VERSION: r29@sha256:17fa49a22694ca52fa86c24f9907149d8bcf6d2d79909b5105410560104fb016
9+
IMAGE_VERSION_SWTPM: ${IMAGE_VERSION_SWTPM:?}
1010
volumes:
1111
- log:/var/log/swtpm:rw
1212
tmpfs:

0 commit comments

Comments
 (0)