Skip to content

chore: use --no-cache-dir flag to pip in dockerfiles to save space #180

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

Merged
merged 1 commit into from
Dec 22, 2020
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
6 changes: 3 additions & 3 deletions docker/aws_lambda_layer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ WORKDIR /install
RUN yum install -y amazon-linux-extras
RUN amazon-linux-extras enable python3.8
RUN yum install -y python38 python38-devel python3-pip zip gcc
RUN python3.8 -m pip install --upgrade pip && \
python3.8 -m pip install virtualenv
RUN python3.8 -m pip install --no-cache-dir --upgrade pip && \
python3.8 -m pip install --no-cache-dir virtualenv
RUN python3.8 -m venv lambda
RUN source lambda/bin/activate
# Python dependencies to be included in output zip file:
RUN python3.8 -m pip install influxdb-client[ciso] -t /install/python
RUN python3.8 -m pip install --no-cache-dir influxdb-client[ciso] -t /install/python
# Create zip file
RUN zip -r /install/python.zip python/
VOLUME ["/install"]