From 565e2a6c33081c9e045201079b78abc853fa10f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= Date: Thu, 20 Jul 2023 10:37:01 +0200 Subject: [PATCH 1/2] chore: bump rust to 1.71.0 and use vendored openssl --- image/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/image/Dockerfile b/image/Dockerfile index 1e81d5ff..98d3b339 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -1,12 +1,15 @@ # Build wasm_runtime in release mode -FROM --platform=$TARGETPLATFORM rust:1.64.0-slim as build-wws +FROM --platform=$TARGETPLATFORM rust:1.71.0-slim as build-wws ARG WWS_BUILD_DIR=/usr/src/wws ARG TARGETPLATFORM ARG BUILDPLATFORM WORKDIR $WWS_BUILD_DIR COPY ./ $WWS_BUILD_DIR/ +RUN echo "Installing build prerequisites" +RUN apt-get update && \ + apt-get install -y --no-install-recommends build-essential RUN echo "Running on ${BUILDPLATFORM}, building for ${TARGETPLATFORM}" RUN set -eux; \ ls -l .; \ @@ -16,7 +19,7 @@ RUN set -eux; \ *) echo >&2 "unsupported architecture: $BUILDPLATFORM"; exit 1 ;; \ esac; \ rustup target add $bldArch; \ - cargo build --release --target=$bldArch; \ + cargo build --release --features vendored-openssl --target=$bldArch; \ mkdir ./build; \ cp ./target/$bldArch/release/wws ./build/wws @@ -28,4 +31,3 @@ RUN mkdir -p /opt COPY --from=build-wws ${WWS_BUILD_DIR}/build/wws /opt CMD ["/opt/wws", "/app/", "--host", "0.0.0.0"] - From cb14bbe44b34f94d7d3321c4696615948391d089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= Date: Thu, 20 Jul 2023 11:08:33 +0200 Subject: [PATCH 2/2] chore: install ca-certificates in resulting image --- image/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/image/Dockerfile b/image/Dockerfile index 98d3b339..30bd30e5 100644 --- a/image/Dockerfile +++ b/image/Dockerfile @@ -26,6 +26,8 @@ RUN set -eux; \ FROM --platform=$TARGETPLATFORM debian:bullseye-slim ARG WWS_BUILD_DIR=/usr/src/wws +RUN apt-get update && \ + apt-get install -y --no-install-recommends ca-certificates RUN mkdir -p /app RUN mkdir -p /opt COPY --from=build-wws ${WWS_BUILD_DIR}/build/wws /opt