Files
agent-claw/cdk/node_modules/@aws-cdk/asset-awscli-v1/layer/Dockerfile
2026-05-06 18:55:16 -05:00

60 lines
841 B
Docker

FROM public.ecr.aws/sam/build-python3.11
RUN mkdir -p /opt
WORKDIR /tmp
#
# tools
#
RUN yum update -y \
&& yum install -y zip unzip wget tar gzip
#
# aws cli
#
COPY requirements.txt ./
RUN python -m pip install -r requirements.txt -t /opt/awscli
#
# Add the LICENSE file
#
COPY LICENSE /opt/awscli/LICENSE
#
# organize for self-contained usage
#
RUN mv /opt/awscli/bin/aws /opt/awscli
#
# cleanup
#
RUN rm -rf \
/opt/awscli/pip* \
/opt/awscli/setuptools* \
&& cd /opt/awscli/awscli/examples \
&& ls | grep -v "global_options.rst" | xargs rm -rf
#
# Test that the CLI works
#
RUN yum install -y groff
RUN /opt/awscli/aws help
#
# create the bundle
#
RUN cd /opt \
&& zip --symlinks -r ../layer.zip * \
&& echo "/layer.zip is ready" \
&& ls -alh /layer.zip;
WORKDIR /
ENTRYPOINT [ "/bin/bash" ]