1- ARG python_version=3.9.20
2- FROM python:${python_version}-slim-bullseye AS build
1+ ARG python_version=3.12
2+ ARG base_os=bookworm
3+ FROM python:${python_version}-slim-${base_os} AS build
34
45WORKDIR /src
56
89RUN pip install --no-cache-dir poetry
910RUN poetry build
1011
11- FROM python:${python_version}-slim-bullseye AS main
12+ FROM python:${python_version}-slim-${base_os} AS main
1213
1314ARG uid=1001
1415ARG user=aries
@@ -26,7 +27,7 @@ ENV HOME="/home/$user" \
2627 SHELL=/bin/bash \
2728 SUMMARY="aries-cloudagent image" \
2829 DESCRIPTION="aries-cloudagent provides a base image for running Hyperledger Aries agents in Docker. \
29- This image layers the python implementation of aries-cloudagent $acapy_version. Based on Debian Buster ."
30+ This image layers the python implementation of aries-cloudagent $acapy_version. Based on Debian Bookworm ."
3031
3132LABEL summary="$SUMMARY" \
3233 description="$DESCRIPTION" \
@@ -54,12 +55,13 @@ RUN apt-get update -y && \
5455 liblzma5 \
5556 libncurses5 \
5657 libncursesw5 \
57- libsecp256k1-0 \
58+ libsecp256k1-1 \
5859 libzmq5 \
5960 net-tools \
6061 openssl \
6162 sqlite3 \
6263 zlib1g && \
64+ apt-get autoremove -y && \
6365 rm -rf /var/lib/apt/lists/* /usr/share/doc/*
6466
6567WORKDIR $HOME
@@ -85,7 +87,7 @@ RUN mkdir -p \
8587RUN chown -R $user:root $HOME/.indy_client $HOME/.aries_cloudagent && \
8688 chmod -R ug+rw $HOME/log $HOME/ledger $HOME/.aries_cloudagent $HOME/.cache $HOME/.indy_client
8789
88- # 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
8991RUN mkdir -p /home/indy
9092RUN ln -s /home/aries/.indy_client /home/indy/.indy_client
9193
@@ -99,11 +101,11 @@ RUN aries_cloudagent_package=$(find ./ -name "aries_cloudagent*.whl" | head -n 1
99101 rm aries_cloudagent*.whl && \
100102 chmod +rx $(python -m site --user-site) $HOME/.local
101103
102- # Clean-up unneccessary build dependencies and reduce final image size
104+ # Clean-up unneccessary build dependencies and reduce image size
103105USER root
104106RUN apt-get purge -y --auto-remove build-essential
105107RUN dpkg -r --force-all apt apt-get && dpkg -r --force-all debconf dpkg
106108
107109USER $user
108110
109- ENTRYPOINT ["aca-py" ]
111+ ENTRYPOINT ["aca-py" ]
0 commit comments