From 2f65d2e8b64b03d12ee3102d600dee9d966a426c Mon Sep 17 00:00:00 2001 From: Demur Rumed Date: Fri, 3 Nov 2023 00:13:05 +0000 Subject: [PATCH] peerdb-server: use Debian slim over Ubuntu This makes it consistent with the other docker images Also remove wget --- scripts/install-protobuf.sh | 10 +++++----- stacks/peerdb-server.Dockerfile | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/install-protobuf.sh b/scripts/install-protobuf.sh index 3f636b0716..a825016c58 100755 --- a/scripts/install-protobuf.sh +++ b/scripts/install-protobuf.sh @@ -4,7 +4,7 @@ set -Eeuo pipefail # install the protobuf compiler PROTOBUF_MAJOR_VERSION=3 PROTOBUF_MINOR_VERSION=23.4 -PROTOBUF_VERSION=${PROTOBUF_MAJOR_VERSION}.${PROTOBUF_MINOR_VERSION} +PROTOBUF_VERSION="$PROTOBUF_MAJOR_VERSION.$PROTOBUF_MINOR_VERSION" ARCH=$(uname -m) case "$ARCH" in @@ -17,14 +17,14 @@ case "$ARCH" in esac echo $ARCH # setup the variables for the archive and download url -PROTOBUF_ARCHIVE=protoc-${PROTOBUF_MINOR_VERSION}-linux-${ARCH}.zip -PROTOBUF_URL=https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOBUF_MINOR_VERSION}/${PROTOBUF_ARCHIVE} +PROTOBUF_ARCHIVE="protoc-$PROTOBUF_MINOR_VERSION-linux-$ARCH.zip" +PROTOBUF_URL="https://github.com/protocolbuffers/protobuf/releases/download/v$PROTOBUF_MINOR_VERSION/$PROTOBUF_ARCHIVE" mkdir -p /tmp/protoc-install pushd /tmp/protoc-install -wget ${PROTOBUF_URL} -O ${PROTOBUF_ARCHIVE} -unzip ${PROTOBUF_ARCHIVE} -d protoc3 +curl -L "$PROTOBUF_URL" -O +unzip "$PROTOBUF_ARCHIVE" -d protoc3 mv protoc3/bin/* /usr/local/bin/ mv protoc3/include/* /usr/local/include/ diff --git a/stacks/peerdb-server.Dockerfile b/stacks/peerdb-server.Dockerfile index 68ba566d50..0fc0e4469d 100644 --- a/stacks/peerdb-server.Dockerfile +++ b/stacks/peerdb-server.Dockerfile @@ -12,7 +12,7 @@ FROM chef as builder RUN apt-get update \ && DEBIAN_FRONTEND=noninteractive \ apt-get install --assume-yes --no-install-recommends \ - build-essential libssl-dev pkg-config wget unzip + build-essential libssl-dev pkg-config unzip WORKDIR /root/nexus COPY scripts /root/scripts RUN /bin/bash -c /root/scripts/install-protobuf.sh @@ -25,8 +25,8 @@ COPY protos protos WORKDIR /root/nexus RUN CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse cargo build --release --bin peerdb-server -FROM ubuntu:22.04 -RUN apt-get update && apt-get install -y ca-certificates postgresql-client wget curl iputils-ping +FROM debian:bookworm-slim +RUN apt-get update && apt-get install -y ca-certificates postgresql-client curl iputils-ping RUN mkdir -p /var/log/peerdb WORKDIR /root COPY --from=builder /root/nexus/target/release/peerdb-server .