Skip to content

Commit db5cf61

Browse files
committed
Fix Docker production: replace su-exec with gosu for Debian bookworm compatibility
1 parent 313052d commit db5cf61

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

development/qnet-integration/Dockerfile.production

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ RUN cargo build --profile release-fast --bin qnet-node \
3434
# Production runtime image
3535
FROM debian:bookworm-slim
3636

37-
# Install minimal runtime dependencies including su-exec for user switching
37+
# Install minimal runtime dependencies including gosu for user switching
3838
RUN apt-get update && apt-get install -y \
3939
libssl3 \
4040
ca-certificates \
4141
curl \
42-
su-exec \
42+
gosu \
4343
&& rm -rf /var/lib/apt/lists/* \
4444
&& groupadd -r qnet \
4545
&& useradd -r -g qnet -s /bin/false qnet
@@ -61,7 +61,7 @@ if [ "$(id -u)" = "0" ]; then\n\
6161
chown -R qnet:qnet "$DATA_DIR"\n\
6262
chmod -R 755 "$DATA_DIR"\n\
6363
echo "Starting QNet node as qnet user..."\n\
64-
exec su-exec qnet /usr/local/bin/qnet-node "$@"\n\
64+
exec gosu qnet /usr/local/bin/qnet-node "$@"\n\
6565
else\n\
6666
exec /usr/local/bin/qnet-node "$@"\n\
6767
fi' > /usr/local/bin/entrypoint.sh \

development/qnet-integration/src/node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ impl BlockchainNode {
175175
let consensus_config = qnet_consensus::ConsensusConfig {
176176
commit_phase_duration: Duration::from_secs(30),
177177
reveal_phase_duration: Duration::from_secs(30),
178-
min_participants: 3, // Minimum 3 nodes for Byzantine fault tolerance
178+
min_participants: 1, // Allow single node for genesis bootstrap
179179
max_participants: 1000, // Maximum participants per round
180180
max_validators_per_round: 21, // Like major blockchains
181181
enable_validator_sampling: true, // For scalability

0 commit comments

Comments
 (0)