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

Update the base image for ci-build's Dockerfile #2674

Merged
merged 10 commits into from
Sep 7, 2023
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,9 @@ jobs:
with:
toolchain: ${{ env.rust_version }}
components: ${{ env.rust_toolchain_components }}
# To fix OpenSSL not found on Windows: https://github.com/sfackler/rust-openssl/issues/1542
- run: echo "VCPKG_ROOT=$env:VCPKG_INSTALLATION_ROOT" | Out-File -FilePath $env:GITHUB_ENV -Append
- run: vcpkg install openssl:x64-windows-static-md
- name: Run tests
shell: bash
run: |
Expand Down
6 changes: 6 additions & 0 deletions rust-runtime/aws-smithy-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ hyper = { version = "0.14.26", default-features = false, optional = true }
# https://github.com/rust-lang/cargo/issues/1596
hyper-rustls = { version = "0.24", optional = true, features = ["rustls-native-certs", "http2"] }
hyper-tls = { version = "0.5.0", optional = true }
# This forces a more recent version of `openssl-sys` to be brought in.
# Without this `cargo minimal-versions check` would fail in a container whose base image is `amazonlinux:2023`
# with the failure symptom: https://github.com/sfackler/rust-openssl/issues/1724
openssl = { version = "0.10.52", optional = true }
rustls = { version = "0.21.1", optional = true }
lazy_static = { version = "1", optional = true }
pin-project-lite = "0.2.7"
Expand All @@ -45,6 +49,8 @@ tracing = "0.1"
[dev-dependencies]
aws-smithy-async = { path = "../aws-smithy-async", features = ["rt-tokio"] }
hyper-tls = { version = "0.5.0" }
# Dependency on `openssl` above needs to be repeated here.
openssl = "0.10.52"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1.23.1", features = ["full", "test-util"] }
Expand Down
10 changes: 6 additions & 4 deletions tools/ci-build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@

# This is the base Docker build image used by CI

ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2
ARG base_image=public.ecr.aws/amazonlinux/amazonlinux:2023
ARG rust_stable_version=1.70.0
ARG rust_nightly_version=nightly-2023-05-31

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 yum -y install --allowerasing 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 \
Expand All @@ -30,7 +30,7 @@ ENV RUSTUP_HOME=/opt/rustup \
PATH=/opt/cargo/bin/:${PATH} \
CARGO_INCREMENTAL=0
WORKDIR /root
RUN yum -y install \
RUN yum -y install --allowerasing \
autoconf \
automake \
binutils \
Expand All @@ -41,6 +41,7 @@ RUN yum -y install \
git \
make \
openssl-devel \
perl \
pkgconfig \
tar \
xz && \
Expand Down Expand Up @@ -153,12 +154,13 @@ FROM bare_base_image AS final_image
ARG rust_stable_version
ARG rust_nightly_version
RUN set -eux; \
yum -y install \
yum -y install --allowerasing \
bc \
ca-certificates \
clang \
gcc \
git \
glibc-langpack-en \
java-11-amazon-corretto-headless \
make \
openssl-devel \
Expand Down