@@ -104,7 +104,7 @@ LABEL summary="$SUMMARY" \
104
104
io.k8s.description="$DESCRIPTION" \
105
105
io.k8s.display-name="indy-python $indy_version" \
106
106
name="indy-python" \
107
- version="$indy_version" \
107
+ indy-sdk. version="$indy_version" \
108
108
maintainer=""
109
109
110
110
# Add indy user
@@ -159,18 +159,17 @@ RUN usermod -a -G 0 $user
159
159
# Create standard directories to allow volume mounting and set permissions
160
160
# Note: PIP_NO_CACHE_DIR environment variable should be cleared to allow caching
161
161
RUN mkdir -p \
162
+ $HOME/.aries_cloudagent \
162
163
$HOME/.cache/pip/http \
163
- $HOME/.indy-cli/networks \
164
164
$HOME/.indy_client/wallet \
165
165
$HOME/.indy_client/pool \
166
166
$HOME/.indy_client/ledger-cache \
167
167
$HOME/ledger/sandbox/data \
168
168
$HOME/log
169
169
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
174
173
175
174
USER $user
176
175
@@ -193,10 +192,10 @@ ADD requirements*.txt ./
193
192
194
193
USER root
195
194
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
200
199
201
200
ADD --chown=indy:root . .
202
201
USER indy
@@ -243,26 +242,22 @@ LABEL summary="$SUMMARY" \
243
242
io.k8s.description="$DESCRIPTION" \
244
243
io.k8s.display-name="aries-cloudagent $acapy_version" \
245
244
name="aries-cloudagent" \
246
- version="$acapy_version" \
245
+ acapy. version="$acapy_version" \
247
246
maintainer=""
248
247
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.
257
250
COPY --from=acapy-builder /src/dist/aries_cloudagent*.whl .
258
-
259
- # Install ACA-py from the wheel.
260
251
RUN aries_cloudagent_package=$(find ./ -name "aries_cloudagent*.whl" | head -n 1) && \
261
252
echo "Installing ${aries_cloudagent_package} ..." && \
262
253
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)
264
256
265
257
# 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
267
262
268
263
ENTRYPOINT ["aca-py"]
0 commit comments