Skip to content

Commit 1cb11c5

Browse files
committed
use rust find tools
1 parent 1f2125c commit 1cb11c5

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

services/catalog/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
3131
set -eux && \
3232
apt-get update && \
3333
apt-get install -y --no-install-recommends \
34+
fd-find \
3435
gosu \
3536
&& apt-get clean -y \
3637
&& rm -rf /var/lib/apt/lists/* \

services/catalog/docker/boot.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ SERVER_LOG_LEVEL=$(echo "${APP_LOG_LEVEL}" | tr '[:upper:]' '[:lower:]')
4040
echo "$INFO" "Log-level app/server: $APP_LOG_LEVEL/$SERVER_LOG_LEVEL"
4141

4242
if [ "${SC_BOOT_MODE}" = "debug" ]; then
43-
reload_dir_packages=$(find /devel/packages -maxdepth 3 -type d -path "*/src/*" ! -path "*.*" -exec echo '--reload-dir {} \' \;)
43+
reload_dir_packages=$(fdfind --type directory --max-depth 3 --glob '*/src/*' --exclude '*.*' /devel/packages --exec echo '--reload-dir {} \')
4444

4545
exec sh -c "
4646
cd services/catalog/src/simcore_service_catalog && \

services/catalog/docker/entrypoint.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,12 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
5656
usermod --uid "$HOST_USERID" --gid "$HOST_GROUPID" "$SC_USER_NAME"
5757

5858
echo "$INFO" "Changing group properties of files around from $SC_USER_ID to group $CONT_GROUPNAME"
59-
find / -path /proc -prune -o -group "$SC_USER_ID" -exec chgrp --no-dereference "$CONT_GROUPNAME" {} \;
59+
# find / -path /proc -prune -o -group "$SC_USER_ID" -exec chgrp --no-dereference "$CONT_GROUPNAME" {} \;
60+
fdfind --owner ":$SC_USER_ID" --exclude proc --exec-batch chgrp --no-dereference "$CONT_GROUPNAME"
6061
# change user property of files already around
6162
echo "$INFO" "Changing ownership properties of files around from $SC_USER_ID to group $CONT_GROUPNAME"
62-
find / -path /proc -prune -o -user "$SC_USER_ID" -exec chown --no-dereference "$SC_USER_NAME" {} \;
63+
# find / -path /proc -prune -o -user "$SC_USER_ID" -exec chown --no-dereference "$SC_USER_NAME" {} \;
64+
fdfind --owner "$SC_USER_ID:" --exclude proc --exec-batch chown --no-dereference "$SC_USER_NAME"
6365
fi
6466
fi
6567

0 commit comments

Comments
 (0)