Skip to content

Commit c52f287

Browse files
authored
Merge pull request #2996 from input-output-hk/jpraynaud/fix-devnet
fix(devnet): Docker images
2 parents df080cd + 07cb965 commit c52f287

File tree

16 files changed

+94
-27
lines changed

16 files changed

+94
-27
lines changed

Cargo.lock

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

mithril-aggregator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.8.20"
3+
version = "0.8.21"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-aggregator/Dockerfile.ci

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ FROM $DOCKER_IMAGE_FROM
77
# Build-time platform architecture
88
ARG TARGETARCH
99

10+
# Upgrade
11+
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget adduser && apt-get clean && rm -rf /var/lib/apt/lists/*
12+
1013
# Create appuser
1114
RUN adduser --no-create-home --disabled-password appuser
1215

1316
# Precreate workdir
1417
RUN mkdir -p /app/bin
1518

16-
# Upgrade
17-
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget && apt-get clean && rm -rf /var/lib/apt/lists/*
18-
1919
# Install cardano-cli
2020
ARG CARDANO_NODE_VERSION=10.5.1
2121
ARG CARDANO_BIN_URL=https://github.com/input-output-hk/cardano-node/releases/download/$CARDANO_NODE_VERSION/cardano-node-$CARDANO_NODE_VERSION-linux.tar.gz

mithril-aggregator/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ docker-build:
3232
cd ../ && docker build -t mithril/mithril-aggregator -f mithril-aggregator/Dockerfile .
3333

3434
docker-build-ci: build
35+
# Check that we are on Linux, then build
36+
if [ "$$(uname -s)" != "Linux" ]; then \
37+
echo "Error: this target only supports Linux"; \
38+
exit 1; \
39+
fi; \
40+
RAW_ARCH=$$(uname -m); \
41+
if [ "$$RAW_ARCH" = "x86_64" ]; then \
42+
ARCH="amd64"; \
43+
elif [ "$$RAW_ARCH" = "aarch64" ]; then \
44+
ARCH="arm64"; \
45+
else \
46+
echo "Error: unsupported architecture $$RAW_ARCH"; \
47+
exit 1; \
48+
fi; \
49+
mkdir -p ./bin-linux-$${ARCH}; \
50+
cp ../target/release/mithril-aggregator ./bin-linux-$${ARCH}/mithril-aggregator
3551
cd ../ && docker build -t mithril/mithril-aggregator -f mithril-aggregator/Dockerfile.ci --build-arg DOCKER_IMAGE_FROM --build-arg CARDANO_NODE_VERSION .
3652

3753
docker-run:

mithril-aggregator/src/services/certifier/interface.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub enum CertifierServiceError {
3838

3939
/// No certificate for this epoch
4040
#[error(
41-
"There is an epoch gap between the last certificate epoch ({certificate_epoch:?}) and current epoch ({current_epoch:?})"
41+
"There is an epoch gap between the last certificate epoch ({certificate_epoch:?}) and current epoch ({current_epoch:?}). A leader aggregator must be re-genesis by the owner of the genesis keys, a follower aggregator will automatically catchup with the leader's certificate chain."
4242
)]
4343
CertificateEpochGap {
4444
/// Epoch of the last issued certificate

mithril-client-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-client-cli"
3-
version = "0.12.38"
3+
version = "0.12.39"
44
description = "A Mithril Client"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-client-cli/Dockerfile.ci

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ FROM $DOCKER_IMAGE_FROM
77
# Build-time platform architecture
88
ARG TARGETARCH
99

10+
# Upgrade
11+
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget adduser && apt-get clean && rm -rf /var/lib/apt/lists/*
12+
1013
# Create appuser
1114
RUN adduser --disabled-password appuser
1215

1316
# Precreate workdir
1417
RUN mkdir -p /app/bin
1518

16-
# Upgrade
17-
RUN apt-get update -y && apt-get install -y libssl-dev ca-certificates wget && apt-get clean && rm -rf /var/lib/apt/lists/*
18-
1919
# Copy the executable
2020
COPY mithril-client-cli/bin-linux-$TARGETARCH/mithril-client /app/bin/mithril-client
2121

mithril-client-cli/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ docker-build:
4040
cd ../ && docker build -t mithril/mithril-client -f mithril-client-cli/Dockerfile .
4141

4242
docker-build-ci: build
43+
# Check that we are on Linux, then build
44+
if [ "$$(uname -s)" != "Linux" ]; then \
45+
echo "Error: this target only supports Linux"; \
46+
exit 1; \
47+
fi; \
48+
RAW_ARCH=$$(uname -m); \
49+
if [ "$$RAW_ARCH" = "x86_64" ]; then \
50+
ARCH="amd64"; \
51+
elif [ "$$RAW_ARCH" = "aarch64" ]; then \
52+
ARCH="arm64"; \
53+
else \
54+
echo "Error: unsupported architecture $$RAW_ARCH"; \
55+
exit 1; \
56+
fi; \
57+
mkdir -p ./bin-linux-$${ARCH}; \
58+
cp ../target/release/mithril-client ./bin-linux-$${ARCH}/mithril-client
4359
cd ../ && docker build -t mithril/mithril-client -f mithril-client-cli/Dockerfile.ci --build-arg DOCKER_IMAGE_FROM .
4460

4561
docker-run:

mithril-relay/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-relay"
3-
version = "0.2.1"
3+
version = "0.2.2"
44
description = "A Mithril relay"
55
authors = { workspace = true }
66
edition = { workspace = true }

mithril-relay/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,22 @@ docker-build:
2626
cd ../ && docker build -t mithril/mithril-relay -f mithril-relay/Dockerfile .
2727

2828
docker-build-ci: build
29+
# Check that we are on Linux, then build
30+
if [ "$$(uname -s)" != "Linux" ]; then \
31+
echo "Error: this target only supports Linux"; \
32+
exit 1; \
33+
fi; \
34+
RAW_ARCH=$$(uname -m); \
35+
if [ "$$RAW_ARCH" = "x86_64" ]; then \
36+
ARCH="amd64"; \
37+
elif [ "$$RAW_ARCH" = "aarch64" ]; then \
38+
ARCH="arm64"; \
39+
else \
40+
echo "Error: unsupported architecture $$RAW_ARCH"; \
41+
exit 1; \
42+
fi; \
43+
mkdir -p ./bin-linux-$${ARCH}; \
44+
cp ../target/release/mithril-relay ./bin-linux-$${ARCH}/mithril-relay
2945
cd ../ && docker build -t mithril/mithril-relay -f mithril-relay/Dockerfile.ci --build-arg DOCKER_IMAGE_FROM .
3046

3147
docker-run:

0 commit comments

Comments
 (0)