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

Shim libssl issue #2221

Merged
merged 4 commits into from
Dec 13, 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
13 changes: 8 additions & 5 deletions nitro-shim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@ RUN make -C ./gvproxy/ gvproxy
RUN make -C ./eifbuild/ eifbuild

FROM rust:1.67 as rust_builder
RUN cargo install --git https://github.com/aws/aws-nitro-enclaves-image-format --example eif_build
RUN apt update && apt install -y libssl-dev musl-tools musl-dev
ENV OPENSSL_STATIC=1
RUN rustup target add x86_64-unknown-linux-musl
RUN ln -s /usr/include/x86_64-linux-gnu/openssl/opensslconf.h /usr/include/openssl/
RUN git clone https://github.com/aws/aws-nitro-enclaves-image-format
RUN cd aws-nitro-enclaves-image-format && \
sed -i -e 's/^openssl.*/openssl = { version = "0.10", features = ["vendored"] }/g' Cargo.toml && \
cargo install --target x86_64-unknown-linux-musl --path . --example eif_build

FROM amazonlinux:2.0.20230207.0

Expand All @@ -20,15 +27,11 @@ RUN amazon-linux-extras install aws-nitro-enclaves-cli -y && \
rm -rf /var/cache/yum && \
mkdir -p /enclave

RUN yum install openssl -y
RUN yum install libssl-dev openssl-devel -y

WORKDIR /enclave

COPY --from=builder /src/viproxy/viproxy /enclave/
COPY --from=builder /src/gvproxy/gvproxy /enclave/
COPY --from=builder /src/eifbuild/eifbuild /enclave/
COPY --from=rust_builder /usr/local/cargo/bin/eif_build /bin/eif_build


COPY scripts/ /enclave/