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

Clean up unnecessary resources after installation in docker file #483

Merged
merged 1 commit into from
Jun 8, 2021
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
14 changes: 9 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,18 @@ RUN if [ "$EFSUTILSSOURCE" = "yum" ]; \
git clone https://github.com/aws/efs-utils && \
cd efs-utils && \
git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) && \
make rpm && yum -y install build/amazon-efs-utils*rpm; \
make rpm && yum -y install build/amazon-efs-utils*rpm && \
# clean up efs-utils folder after install
cd .. && rm -rf efs-utils && \
yum clean all; \
fi

# Install botocore required by efs-utils for cross account mount
RUN yum -y install wget
RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py
RUN python3 /tmp/get-pip.py
RUN pip3 install botocore || /usr/local/bin/pip3 install botocore
RUN yum -y install wget && \
wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && \
python3 /tmp/get-pip.py && \
pip3 install botocore || /usr/local/bin/pip3 install botocore && \
rm -rf /tmp/get-pip.py

# At image build time, static files installed by efs-utils in the config directory, i.e. CAs file, need
# to be saved in another place so that the other stateful files created at runtime, i.e. private key for
Expand Down