Skip to content

Commit 72185aa

Browse files
esuneWadeBarnes
authored andcommitted
Tweak dockerfiles to install build dependencies and remove them when done
Signed-off-by: Emiliano Suñé <emiliano.sune@gmail.com>
1 parent 2102fb1 commit 72185aa

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

docker/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ RUN apt-get update -y && \
4444
apt-get install -y --no-install-recommends \
4545
apt-transport-https \
4646
ca-certificates \
47+
build-essential \
4748
bzip2 \
4849
curl \
4950
git \
@@ -88,6 +89,9 @@ COPY --from=build /src/dist/aries_cloudagent*.whl .
8889

8990
RUN pip install --no-cache-dir --find-links=. aries_cloudagent${acapy_reqs} && rm aries_cloudagent*.whl
9091

92+
# Clean-up unneccessary build dependencies and reduce final image size
93+
RUN apt-get purge -y --auto-remove build-essential
94+
9195
USER $user
9296

9397
ENTRYPOINT ["aca-py"]

docker/Dockerfile.indy

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ RUN apt-get update -y && \
115115
apt-get install -y --no-install-recommends \
116116
apt-transport-https \
117117
ca-certificates \
118+
build-essential \
118119
bzip2 \
119120
curl \
120121
git \
@@ -257,4 +258,7 @@ COPY --from=acapy-builder /src/dist/aries_cloudagent*.whl .
257258

258259
RUN pip install --no-cache-dir --find-links=. aries_cloudagent${acapy_reqs} && rm aries_cloudagent*.whl
259260

261+
# Clean-up unneccessary build dependencies and reduce final image size
262+
# RUN apt-get purge -y --auto-remove build-essential
263+
260264
ENTRYPOINT ["aca-py"]

0 commit comments

Comments
 (0)