Skip to content

Commit e2ac991

Browse files
authored
Merge branch 'main' into fix/delete-tails-return-schema
2 parents 9fdc86f + f90672c commit e2ac991

File tree

2 files changed

+28
-30
lines changed

2 files changed

+28
-30
lines changed

Diff for: docker/Dockerfile

+10-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LABEL summary="$SUMMARY" \
3333
io.k8s.description="$DESCRIPTION" \
3434
io.k8s.display-name="aries-cloudagent $acapy_version" \
3535
name="aries-cloudagent" \
36-
version="$acapy_version" \
36+
acapy.version="$acapy_version" \
3737
maintainer=""
3838

3939
# Add aries user
@@ -81,19 +81,22 @@ RUN mkdir -p \
8181
$HOME/ledger/sandbox/data \
8282
$HOME/log
8383

84-
# The root group needs access the directories under $HOME for the container to function in OpenShift.
85-
# Also ensure the permissions on the python 'site-packages' folder are set correctly.
86-
RUN chmod -R ug+rw $HOME/log $HOME/ledger $HOME/.aries_cloudagent $HOME/.cache
84+
# The root group needs access the directories under $HOME/.aries_cloudagent for the container to function in OpenShift.
85+
RUN chown -R $user:root $HOME/.aries_cloudagent && \
86+
chmod -R ug+rw $HOME/log $HOME/ledger $HOME/.aries_cloudagent $HOME/.cache
8787

88+
# Install ACA-py from the wheel as $user,
89+
# and ensure the permissions on the python 'site-packages' and $HOME/.local folders are set correctly.
90+
USER $user
8891
COPY --from=build /src/dist/aries_cloudagent*.whl .
89-
90-
# Install ACA-py from the wheel.
9192
RUN aries_cloudagent_package=$(find ./ -name "aries_cloudagent*.whl" | head -n 1) && \
9293
echo "Installing ${aries_cloudagent_package} ..." && \
9394
pip install --no-cache-dir --find-links=. ${aries_cloudagent_package}${acapy_reqs} && \
94-
rm aries_cloudagent*.whl
95+
rm aries_cloudagent*.whl && \
96+
chmod +rx $(python -m site --user-site) $HOME/.local
9597

9698
# Clean-up unneccessary build dependencies and reduce final image size
99+
USER root
97100
RUN apt-get purge -y --auto-remove build-essential
98101

99102
USER $user

Diff for: docker/Dockerfile.indy

+18-23
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ LABEL summary="$SUMMARY" \
104104
io.k8s.description="$DESCRIPTION" \
105105
io.k8s.display-name="indy-python $indy_version" \
106106
name="indy-python" \
107-
version="$indy_version" \
107+
indy-sdk.version="$indy_version" \
108108
maintainer=""
109109

110110
# Add indy user
@@ -159,18 +159,17 @@ RUN usermod -a -G 0 $user
159159
# Create standard directories to allow volume mounting and set permissions
160160
# Note: PIP_NO_CACHE_DIR environment variable should be cleared to allow caching
161161
RUN mkdir -p \
162+
$HOME/.aries_cloudagent \
162163
$HOME/.cache/pip/http \
163-
$HOME/.indy-cli/networks \
164164
$HOME/.indy_client/wallet \
165165
$HOME/.indy_client/pool \
166166
$HOME/.indy_client/ledger-cache \
167167
$HOME/ledger/sandbox/data \
168168
$HOME/log
169169

170-
# The root group needs access the directories under $HOME/.indy_client for the container to function in OpenShift.
171-
# Also ensure the permissions on the python 'site-packages' folder are set correctly.
172-
RUN chown -R $user:root $HOME/.indy_client \
173-
&& chmod -R ug+rw $HOME/log $HOME/ledger $HOME/.cache $HOME/.indy_client
170+
# The root group needs access the directories under $HOME/.indy_client and $HOME/.aries_cloudagent for the container to function in OpenShift.
171+
RUN chown -R $user:root $HOME/.indy_client $HOME/.aries_cloudagent && \
172+
chmod -R ug+rw $HOME/log $HOME/ledger $HOME/.aries_cloudagent $HOME/.cache $HOME/.indy_client
174173

175174
USER $user
176175

@@ -193,10 +192,10 @@ ADD requirements*.txt ./
193192

194193
USER root
195194
RUN pip3 install --no-cache-dir \
196-
-r requirements.txt \
197-
-r requirements.askar.txt \
198-
-r requirements.bbs.txt \
199-
-r requirements.dev.txt
195+
-r requirements.txt \
196+
-r requirements.askar.txt \
197+
-r requirements.bbs.txt \
198+
-r requirements.dev.txt
200199

201200
ADD --chown=indy:root . .
202201
USER indy
@@ -243,26 +242,22 @@ LABEL summary="$SUMMARY" \
243242
io.k8s.description="$DESCRIPTION" \
244243
io.k8s.display-name="aries-cloudagent $acapy_version" \
245244
name="aries-cloudagent" \
246-
version="$acapy_version" \
245+
acapy.version="$acapy_version" \
247246
maintainer=""
248247

249-
# Create standard directories to allow volume mounting and set permissions
250-
# Note: PIP_NO_CACHE_DIR environment variable should be cleared to allow caching
251-
RUN mkdir -p $HOME/.aries_cloudagent
252-
253-
# The root group needs access the directories under $HOME/.indy_client for the container to function in OpenShift.
254-
# Also ensure the permissions on the python 'site-packages' folder are set correctly.
255-
RUN chmod -R ug+rw $HOME/.aries_cloudagent
256-
248+
# Install ACA-py from the wheel as $user,
249+
# and ensure the permissions on the python 'site-packages' folder are set correctly.
257250
COPY --from=acapy-builder /src/dist/aries_cloudagent*.whl .
258-
259-
# Install ACA-py from the wheel.
260251
RUN aries_cloudagent_package=$(find ./ -name "aries_cloudagent*.whl" | head -n 1) && \
261252
echo "Installing ${aries_cloudagent_package} ..." && \
262253
pip install --no-cache-dir --find-links=. ${aries_cloudagent_package}${acapy_reqs} && \
263-
rm aries_cloudagent*.whl
254+
rm aries_cloudagent*.whl && \
255+
chmod +rx $(python -m site --user-site)
264256

265257
# Clean-up unneccessary build dependencies and reduce final image size
266-
# RUN apt-get purge -y --auto-remove build-essential
258+
USER root
259+
RUN apt-get purge -y --auto-remove build-essential
260+
261+
USER $user
267262

268263
ENTRYPOINT ["aca-py"]

0 commit comments

Comments
 (0)