Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump rust to 1.71.0 and use vendored openssl #184

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]