Skip to content

Commit 24a7e99

Browse files
authored
Merge pull request #5 from CPqD/fix-vulnerabilities-0-12-1-rc1-cpqd
Fix vulnerabilities 0 12 1 rc1 cpqd
2 parents b6211a5 + efbe366 commit 24a7e99

1 file changed

Lines changed: 10 additions & 8 deletions

File tree

docker/Dockerfile

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
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

45
WORKDIR /src
56

@@ -8,7 +9,7 @@ ADD . .
89
RUN pip install --no-cache-dir poetry
910
RUN poetry build
1011

11-
FROM python:${python_version}-slim-bullseye AS main
12+
FROM python:${python_version}-slim-${base_os} AS main
1213

1314
ARG uid=1001
1415
ARG 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

3132
LABEL 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

6567
WORKDIR $HOME
@@ -85,7 +87,7 @@ RUN mkdir -p \
8587
RUN 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
8991
RUN mkdir -p /home/indy
9092
RUN 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
103105
USER root
104106
RUN apt-get purge -y --auto-remove build-essential
105107
RUN dpkg -r --force-all apt apt-get && dpkg -r --force-all debconf dpkg
106108

107109
USER $user
108110

109-
ENTRYPOINT ["aca-py"]
111+
ENTRYPOINT ["aca-py"]

0 commit comments

Comments
 (0)