Skip to content

Commit

Permalink
Use rustls for reqwest (smithy-lang#2403)
Browse files Browse the repository at this point in the history
* Use rustls for reqwest

This also adds a CI check to ensure that we can build the SDK on MUSL

* Fix MUSL build in image

* Fix build image
  • Loading branch information
rcoh committed Feb 23, 2023
1 parent 530386e commit 3d40835
Show file tree
Hide file tree
Showing 4 changed files with 427 additions and 257 deletions.
12 changes: 12 additions & 0 deletions tools/ci-build/Dockerfile
Expand Up @@ -12,6 +12,13 @@ ARG rust_nightly_version=nightly-2022-11-16
FROM ${base_image} AS bare_base_image
RUN yum -y updateinfo

FROM bare_base_image as musl_toolchain
RUN yum -y install tar gzip gcc make
RUN curl https://musl.libc.org/releases/musl-1.2.3.tar.gz -o musl-1.2.3.tar.gz \
&& ls \
&& tar xvzf musl-1.2.3.tar.gz \
&& (cd musl-1.2.3 && ./configure && make install)

#
# Rust & Tools Installation Stage
#
Expand Down Expand Up @@ -51,6 +58,7 @@ RUN set -eux; \
rustup component add rustfmt; \
rustup component add clippy; \
rustup toolchain install ${rust_nightly_version} --component clippy; \
rustup target add x86_64-unknown-linux-musl; \
cargo --version; \
cargo +${rust_nightly_version} --version;

Expand Down Expand Up @@ -106,6 +114,8 @@ ARG maturin_version=0.14.1
ARG rust_nightly_version
RUN cargo +${rust_nightly_version} -Z sparse-registry install maturin --locked --version ${maturin_version}



#
# Final image
#
Expand Down Expand Up @@ -138,6 +148,8 @@ COPY --chown=build:build --from=cargo_minimal_versions /opt/cargo/bin/cargo-mini
COPY --chown=build:build --from=cargo_check_external_types /opt/cargo/bin/cargo-check-external-types /opt/cargo/bin/cargo-check-external-types
COPY --chown=build:build --from=maturin /opt/cargo/bin/maturin /opt/cargo/bin/maturin
COPY --chown=build:build --from=install_rust /opt/rustup /opt/rustup
COPY --chown=build:build --from=musl_toolchain /usr/local/musl/ /usr/local/musl/
ENV PATH=$PATH:/usr/local/musl/bin/
ENV PATH=/opt/cargo/bin:$PATH \
CARGO_HOME=/opt/cargo \
RUSTUP_HOME=/opt/rustup \
Expand Down

0 comments on commit 3d40835

Please sign in to comment.