Skip to content

Commit

Permalink
chore: bump rust to 1.71.0 and use vendored openssl (#184)
Browse files Browse the repository at this point in the history
* chore: bump rust to 1.71.0 and use vendored openssl

* chore: install ca-certificates in resulting image
  • Loading branch information
ereslibre authored Jul 20, 2023
1 parent 0f5404b commit e7c22c6
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions image/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 .; \
Expand All @@ -16,16 +19,17 @@ 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


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

CMD ["/opt/wws", "/app/", "--host", "0.0.0.0"]

0 comments on commit e7c22c6

Please sign in to comment.