Skip to content

Commit 382ce9e

Browse files
committed
use rust
1 parent 4c17107 commit 382ce9e

File tree

48 files changed

+81
-65
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+81
-65
lines changed

services/agent/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
3333
set -eux && \
3434
apt-get update && \
3535
apt-get install -y --no-install-recommends \
36+
fd-find \
3637
gosu \
3738
curl \
3839
&& apt-get clean -y \
@@ -85,6 +86,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
8586
set -eux \
8687
&& apt-get update \
8788
&& apt-get install -y --no-install-recommends \
89+
fd-find \
8890
build-essential
8991

9092
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv

services/agent/docker/boot.sh

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

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

5353
exec sh -c "
5454
cd services/agent/src/simcore_service_agent && \

services/agent/docker/entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ 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" {} \;
60-
# change user property of files already around
59+
fdfind --owner ":$SC_USER_ID" --exclude proc --exec-batch chgrp --no-dereference "$CONT_GROUPNAME"
6160
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" {} \;
61+
fdfind --owner "$SC_USER_ID:" --exclude proc --exec-batch chown --no-dereference "$SC_USER_NAME"
6362
fi
6463
fi
6564

services/api-server/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
3030
set -eux && \
3131
apt-get update && \
3232
apt-get install -y --no-install-recommends \
33+
fd-find \
3334
gosu \
3435
&& apt-get clean -y \
3536
&& rm -rf /var/lib/apt/lists/* \
@@ -78,6 +79,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
7879
set -eux \
7980
&& apt-get update \
8081
&& apt-get install -y --no-install-recommends \
82+
fd-find \
8183
build-essential
8284

8385
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv

services/api-server/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/api-server/src/simcore_service_api_server && \

services/api-server/docker/entrypoint.sh

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

5959
echo "$INFO" "Changing group properties of files around from $SC_USER_ID to group $CONT_GROUPNAME"
60-
find / -path /proc -prune -o -group "$SC_USER_ID" -exec chgrp --no-dereference "$CONT_GROUPNAME" {} \;
61-
# change user property of files already around
60+
fdfind --owner ":$SC_USER_ID" --exclude proc --exec-batch chgrp --no-dereference "$CONT_GROUPNAME"
6261
echo "$INFO" "Changing ownership properties of files around from $SC_USER_ID to group $CONT_GROUPNAME"
63-
find / -path /proc -prune -o -user "$SC_USER_ID" -exec chown --no-dereference "$SC_USER_NAME" {} \;
62+
fdfind --owner "$SC_USER_ID:" --exclude proc --exec-batch chown --no-dereference "$SC_USER_NAME"
6463
fi
6564
fi
6665

services/autoscaling/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
3434
set -eux; \
3535
apt-get update; \
3636
apt-get install -y --no-install-recommends \
37+
fd-find \
3738
gosu \
3839
ca-certificates \
3940
curl \
@@ -45,6 +46,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
4546
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
4647
&& apt-get update \
4748
&& apt-get install -y --no-install-recommends \
49+
fd-find \
4850
# only the cli is needed and we remove the unnecessary stuff again
4951
docker-ce-cli=${DOCKER_APT_VERSION} \
5052
&& apt-get remove -y\
@@ -97,6 +99,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
9799
set -eux \
98100
&& apt-get update \
99101
&& apt-get install -y --no-install-recommends \
102+
fd-find \
100103
build-essential
101104

102105
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv

services/autoscaling/docker/boot.sh

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

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

5252
exec sh -c "
5353
cd services/autoscaling/src/simcore_service_autoscaling && \

services/autoscaling/docker/entrypoint.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,9 @@ if [ "${SC_BUILD_TARGET}" = "development" ]; then
6363
usermod --uid "$HOST_USERID" --gid "$HOST_GROUPID" "$SC_USER_NAME"
6464

6565
echo "$INFO" "Changing group properties of files around from $SC_USER_ID to group $CONT_GROUPNAME"
66-
find / -path /proc -prune -o -group "$SC_USER_ID" -exec chgrp --no-dereference "$CONT_GROUPNAME" {} \;
67-
# change user property of files already around
66+
fdfind --owner ":$SC_USER_ID" --exclude proc --exec-batch chgrp --no-dereference "$CONT_GROUPNAME"
6867
echo "$INFO" "Changing ownership properties of files around from $SC_USER_ID to group $CONT_GROUPNAME"
69-
find / -path /proc -prune -o -user "$SC_USER_ID" -exec chown --no-dereference "$SC_USER_NAME" {} \;
68+
fdfind --owner "$SC_USER_ID:" --exclude proc --exec-batch chown --no-dereference "$SC_USER_NAME"
7069
fi
7170
fi
7271

services/clusters-keeper/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
3434
set -eux; \
3535
apt-get update; \
3636
apt-get install -y --no-install-recommends \
37+
fd-find \
3738
gosu \
3839
ca-certificates \
3940
curl \
@@ -45,6 +46,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
4546
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
4647
&& apt-get update \
4748
&& apt-get install -y --no-install-recommends \
49+
fd-find \
4850
# only the cli is needed and we remove the unnecessary stuff again
4951
docker-ce-cli=${DOCKER_APT_VERSION} \
5052
&& apt-get remove -y\
@@ -97,6 +99,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=private \
9799
set -eux \
98100
&& apt-get update \
99101
&& apt-get install -y --no-install-recommends \
102+
fd-find \
100103
build-essential
101104

102105
# install UV https://docs.astral.sh/uv/guides/integration/docker/#installing-uv

0 commit comments

Comments
 (0)