Skip to content

Commit 91dcafb

Browse files
authored
chore: use --no-cache-dir flag to pip in dockerfiles to save space (#180)
Signed-off-by: Pratik Raj <[email protected]>
1 parent ae53701 commit 91dcafb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker/aws_lambda_layer/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ WORKDIR /install
44
RUN yum install -y amazon-linux-extras
55
RUN amazon-linux-extras enable python3.8
66
RUN yum install -y python38 python38-devel python3-pip zip gcc
7-
RUN python3.8 -m pip install --upgrade pip && \
8-
python3.8 -m pip install virtualenv
7+
RUN python3.8 -m pip install --no-cache-dir --upgrade pip && \
8+
python3.8 -m pip install --no-cache-dir virtualenv
99
RUN python3.8 -m venv lambda
1010
RUN source lambda/bin/activate
1111
# Python dependencies to be included in output zip file:
12-
RUN python3.8 -m pip install influxdb-client[ciso] -t /install/python
12+
RUN python3.8 -m pip install --no-cache-dir influxdb-client[ciso] -t /install/python
1313
# Create zip file
1414
RUN zip -r /install/python.zip python/
1515
VOLUME ["/install"]

0 commit comments

Comments
 (0)