Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rhettre committed Jul 27, 2024
1 parent e1c3ddf commit c344d70
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,26 @@ FROM public.ecr.aws/lambda/python:3.9
# Set up the work directory
WORKDIR /var/task

# Install necessary build tools, Rust, and OpenSSL development package
RUN yum install -y zip gcc python3-devel libffi-devel openssl-devel && \
# Install necessary build tools, Rust, and OpenSSL
RUN yum install -y zip gcc python3-devel libffi-devel && \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \
echo 'source $HOME/.cargo/env' >> $HOME/.bashrc && \
source $HOME/.cargo/env
source $HOME/.cargo/env && \
yum install -y wget && \
wget https://www.openssl.org/source/openssl-1.1.1k.tar.gz && \
tar -xzvf openssl-1.1.1k.tar.gz && \
cd openssl-1.1.1k && \
./config --prefix=/usr/local/ssl --openssldir=/usr/local/ssl shared zlib && \
make && make install && \
echo "/usr/local/ssl/lib" > /etc/ld.so.conf.d/openssl-1.1.1k.conf && \
ldconfig && \
cd .. && rm -rf openssl-1.1.1k*

# Set OpenSSL environment variables
ENV LDFLAGS="-L/usr/local/ssl/lib"
ENV CPPFLAGS="-I/usr/local/ssl/include"
ENV LD_LIBRARY_PATH="/usr/local/ssl/lib"
ENV PATH="/usr/local/ssl/bin:${PATH}"

# Copy your application code and requirements.txt into the Docker image
COPY . .
Expand Down

0 comments on commit c344d70

Please sign in to comment.