diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 749af9f5d..af663bde6 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.75" +channel = "1.76" profile = "default" diff --git a/services/backup/Dockerfile b/services/backup/Dockerfile index 98a1cd801..ebc8004d3 100644 --- a/services/backup/Dockerfile +++ b/services/backup/Dockerfile @@ -1,45 +1,45 @@ -FROM rust:1.75-bullseye as builder +FROM rust:1.76-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /home/root/services/backup # Install more recent version of protobuf, must be ran as root COPY scripts/install_protobuf.sh ../../scripts/install_protobuf.sh RUN ../../scripts/install_protobuf.sh ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse # Copy and prepare cargo workspace COPY Cargo.toml ../../Cargo.toml COPY Cargo.lock ../../Cargo.lock # Remove rust-node-addon from cargo workspace RUN sed -i -E '/rust-node-addon/d' ../../Cargo.toml # Copy actual application sources COPY shared ../../shared/ COPY services/backup ./ RUN cargo build --release --target-dir /out # Runner stage FROM debian:bullseye-slim as runner # Update dependencies, install ca-certificates which are required for TLS RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Only copy built binary from builder stage COPY --from=builder /out/release/backup /usr/local/bin/backup WORKDIR /home/comm/app/backup # Create a new user comm and use it to run subsequent commands RUN useradd -m comm USER comm ENV RUST_LOG=info CMD ["backup"] diff --git a/services/blob/Dockerfile b/services/blob/Dockerfile index 4b62f99ca..18735a818 100644 --- a/services/blob/Dockerfile +++ b/services/blob/Dockerfile @@ -1,46 +1,46 @@ -FROM rust:1.75-bullseye as builder +FROM rust:1.76-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /home/root/services/blob # Install more recent version of protobuf, must be ran as root COPY scripts/install_protobuf.sh ../../scripts/install_protobuf.sh RUN ../../scripts/install_protobuf.sh ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse # Copy and prepare cargo workspace COPY Cargo.toml ../../Cargo.toml COPY Cargo.lock ../../Cargo.lock # Remove rust-node-addon from cargo workspace RUN sed -i -E '/rust-node-addon/d' ../../Cargo.toml # Copy actual application sources COPY shared ../../shared/ COPY services/blob ./ RUN cargo build --release --target-dir /out # Runner stage FROM debian:bullseye-slim as runner # Update dependencies, install ca-certificates which are required for TLS RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Only copy built binary from builder stage COPY --from=builder /out/release/blob /usr/local/bin/blob WORKDIR /home/comm/app/blob # Create a new user comm and use it to run subsequent commands RUN useradd -m comm USER comm ENV RUST_LOG=info CMD ["blob", "server"] diff --git a/services/commtest/Dockerfile b/services/commtest/Dockerfile index c684ab34d..c6138d1db 100644 --- a/services/commtest/Dockerfile +++ b/services/commtest/Dockerfile @@ -1,51 +1,51 @@ -FROM rust:1.75-bullseye +FROM rust:1.76-bullseye RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ gnupg software-properties-common python3-pip # These steps are required to install terraform RUN wget -O- https://apt.releases.hashicorp.com/gpg | \ gpg --dearmor | \ tee /usr/share/keyrings/hashicorp-archive-keyring.gpg \ && echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] \ https://apt.releases.hashicorp.com $(lsb_release -cs) main" | \ tee /etc/apt/sources.list.d/hashicorp.list \ && apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ terraform && rm -rf /var/lib/apt/lists/* # install aws-cli v2, we must do this manually and per-platform ARG TARGETPLATFORM RUN if [ $(echo $TARGETPLATFORM | cut -d / -f2) = "arm64" ]; then \ curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"; \ else \ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"; \ fi RUN unzip -q awscliv2.zip && ./aws/install \ && rm -rf awscliv2.zip aws WORKDIR /home/root/services/commtest # Install cargo lambda RUN pip3 install cargo-lambda # Install more recent version of protobuf, must be ran as root COPY scripts/install_protobuf.sh ../../scripts/install_protobuf.sh RUN ../../scripts/install_protobuf.sh ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse # Copy and prepare cargo workspace COPY Cargo.toml ../../Cargo.toml COPY Cargo.lock ../../Cargo.lock # Remove rust-node-addon from cargo workspace RUN sed -i -E '/rust-node-addon/d' ../../Cargo.toml # Copy actual application sources COPY shared ../../shared/ COPY services/terraform/dev ../terraform/dev COPY services/terraform/modules ../terraform/modules COPY services/commtest ./ COPY services/search-index-lambda ../search-index-lambda CMD ["bash", "./run-tests-ci.sh"] diff --git a/services/feature-flags/Dockerfile b/services/feature-flags/Dockerfile index 7e2375427..198fc35e1 100644 --- a/services/feature-flags/Dockerfile +++ b/services/feature-flags/Dockerfile @@ -1,41 +1,41 @@ -FROM rust:1.75-bullseye as builder +FROM rust:1.76-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /home/root/services/feature-flags ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse # Copy and prepare cargo workspace COPY Cargo.toml ../../Cargo.toml COPY Cargo.lock ../../Cargo.lock # Remove rust-node-addon from cargo workspace RUN sed -i -E '/rust-node-addon/d' ../../Cargo.toml # Copy actual application sources COPY shared ../../shared/ COPY services/feature-flags ./ RUN cargo build --release --target-dir /out # Runner stage FROM debian:bullseye-slim as runner # Update dependencies, install ca-certificates which are required for TLS RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Only copy built binary from builder stage COPY --from=builder /out/release/feature-flags /usr/local/bin/feature-flags WORKDIR /home/comm/app/feature-flags # Create a new user comm and use it to run subsequent commands RUN useradd -m comm USER comm ENV RUST_LOG=info CMD ["feature-flags"] diff --git a/services/identity/Dockerfile b/services/identity/Dockerfile index 3f3eb5759..6073c91d9 100644 --- a/services/identity/Dockerfile +++ b/services/identity/Dockerfile @@ -1,46 +1,46 @@ -FROM rust:1.75-bullseye as builder +FROM rust:1.76-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /home/root/app/ WORKDIR /home/root/services/identity # Install more recent version of protobuf, must be ran as root COPY scripts/install_protobuf.sh ../../scripts/install_protobuf.sh RUN ../../scripts/install_protobuf.sh ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse # Copy and prepare cargo workspace COPY Cargo.toml ../../Cargo.toml COPY Cargo.lock ../../Cargo.lock # Remove rust-node-addon from cargo workspace RUN sed -i -E '/rust-node-addon/d' ../../Cargo.toml # Copy actual application sources COPY shared/ ../../shared/ COPY services/identity . RUN cargo build --release --target-dir /out FROM debian:bullseye-slim RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && useradd -m comm WORKDIR /home/comm/app/identity COPY --from=builder /out/release/identity \ /usr/local/bin/identity # For test/debug builds, optionally generate OPAQUE keypair file ARG generate_keypair RUN if [ "$generate_keypair" = "true" ]; then identity keygen; fi USER comm CMD ["identity", "server"] diff --git a/services/reports/Dockerfile b/services/reports/Dockerfile index 42bd2ef8b..2d80bebb4 100644 --- a/services/reports/Dockerfile +++ b/services/reports/Dockerfile @@ -1,45 +1,45 @@ -FROM rust:1.75-bullseye as builder +FROM rust:1.76-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /home/root/services/reports # Install more recent version of protobuf, must be ran as root COPY scripts/install_protobuf.sh ../../scripts/install_protobuf.sh RUN ../../scripts/install_protobuf.sh ENV CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse # Copy and prepare cargo workspace COPY Cargo.toml ../../Cargo.toml COPY Cargo.lock ../../Cargo.lock # Remove rust-node-addon from cargo workspace RUN sed -i -E '/rust-node-addon/d' ../../Cargo.toml # Copy actual application sources COPY shared ../../shared/ COPY services/reports ./ RUN cargo build --release --target-dir /out # Runner stage FROM debian:bullseye-slim as runner # Update dependencies, install ca-certificates which are required for TLS RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* # Only copy built binary from builder stage COPY --from=builder /out/release/reports /usr/local/bin/reports WORKDIR /home/comm/app/reports # Create a new user comm and use it to run subsequent commands RUN useradd -m comm USER comm ENV RUST_LOG=info CMD ["reports"] diff --git a/services/tunnelbroker/Dockerfile b/services/tunnelbroker/Dockerfile index fb223eede..7191452cf 100644 --- a/services/tunnelbroker/Dockerfile +++ b/services/tunnelbroker/Dockerfile @@ -1,40 +1,40 @@ -FROM rust:1.75-bullseye as builder +FROM rust:1.76-bullseye as builder RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ build-essential cmake git libgtest-dev libssl-dev zlib1g-dev \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /home/root/app/ WORKDIR /home/root/services/tunnelbroker # Install more recent version of protobuf, must be ran as root COPY scripts/install_protobuf.sh ../../scripts/install_protobuf.sh RUN ../../scripts/install_protobuf.sh # Copy and prepare cargo workspace COPY Cargo.toml ../../Cargo.toml COPY Cargo.lock ../../Cargo.lock # Remove rust-node-addon from cargo workspace RUN sed -i -E '/rust-node-addon/d' ../../Cargo.toml COPY services/tunnelbroker . COPY shared ../../shared/ RUN cargo build --release --target-dir /out FROM debian:bullseye-slim as runner RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && useradd -m comm \ && mkdir -p /home/comm/app/tunnelbroker WORKDIR /home/comm/app/tunnelbroker COPY --from=builder /out/release/tunnelbroker \ /usr/local/bin/tunnelbroker USER comm CMD ["tunnelbroker"]