1- ARG python_version=3.12
1+ ARG python_version=3.9.20
22ARG base_os=bookworm
33FROM python:${python_version}-slim-${base_os} AS build
44
@@ -7,6 +7,7 @@ WORKDIR /src
77ADD . .
88
99RUN pip install --no-cache-dir poetry
10+ RUN pip install --no-cache-dir --upgrade setuptools==78.1.1 wheel
1011RUN poetry build
1112
1213FROM python:${python_version}-slim-${base_os} AS main
@@ -27,7 +28,7 @@ ENV HOME="/home/$user" \
2728 SHELL=/bin/bash \
2829 SUMMARY="aries-cloudagent image" \
2930 DESCRIPTION="aries-cloudagent provides a base image for running Hyperledger Aries agents in Docker. \
30- This image layers the python implementation of aries-cloudagent $acapy_version. Based on Debian Bookworm ."
31+ This image layers the python implementation of aries-cloudagent $acapy_version. Based on Debian Buster ."
3132
3233LABEL summary="$SUMMARY" \
3334 description="$DESCRIPTION" \
@@ -48,19 +49,18 @@ RUN apt-get update -y && \
4849 build-essential \
4950 bzip2 \
5051 curl \
51- git \
5252 less \
5353 libffi-dev \
5454 libgmp10 \
5555 liblzma5 \
5656 libncurses5 \
5757 libncursesw5 \
58- libsecp256k1-1 \
5958 libzmq5 \
6059 net-tools \
6160 openssl \
6261 sqlite3 \
6362 zlib1g && \
63+ apt-get upgrade -y && \
6464 apt-get autoremove -y && \
6565 rm -rf /var/lib/apt/lists/* /usr/share/doc/*
6666
@@ -87,9 +87,10 @@ RUN mkdir -p \
8787RUN chown -R $user:root $HOME/.indy_client $HOME/.aries_cloudagent && \
8888 chmod -R ug+rw $HOME/log $HOME/ledger $HOME/.aries_cloudagent $HOME/.cache $HOME/.indy_client
8989
90- # Create /home/indy and symlink .indy_client folder for backwards compatibility with artifacts created on older indy-based images
90+ # Create /home/indy and symlink .indy_client folder for backwards compatibility with artifacts created on older indy-based images.
9191RUN mkdir -p /home/indy
9292RUN ln -s /home/aries/.indy_client /home/indy/.indy_client
93+ RUN python -m pip install --upgrade pip setuptools==78.1.1 wheel || true
9394
9495# Install ACA-py from the wheel as $user,
9596# and ensure the permissions on the python 'site-packages' and $HOME/.local folders are set correctly.
@@ -99,9 +100,12 @@ RUN aries_cloudagent_package=$(find ./ -name "aries_cloudagent*.whl" | head -n 1
99100 echo "Installing ${aries_cloudagent_package} ..." && \
100101 pip install --no-cache-dir --find-links=. ${aries_cloudagent_package}${acapy_reqs} && \
101102 rm aries_cloudagent*.whl && \
103+ python -m pip install --user --upgrade pip setuptools wheel && \
104+ python -m pip install --user --upgrade --no-cache-dir setuptools==78.1.1 || true && \
105+ python -m pip install --user --upgrade --no-cache-dir ecdsa==0.19.1 || true && \
102106 chmod +rx $(python -m site --user-site) $HOME/.local
103107
104- # Clean-up unneccessary build dependencies and reduce image size
108+ # Clean-up unneccessary build dependencies and reduce final image size
105109USER root
106110RUN apt-get purge -y --auto-remove build-essential
107111RUN dpkg -r --force-all apt apt-get && dpkg -r --force-all debconf dpkg
0 commit comments