Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Commit 02fc521

Browse files
committed
fix(docker/rootless): entrypoint if executable bit is not set
1 parent a1dda3c commit 02fc521

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

apps/server/Dockerfile.alpine.rootless

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ WORKDIR /home/${USER}/app
2626
COPY ./dist /home/${USER}/app
2727
# Also copy the rootless entrypoint script
2828
COPY rootless-entrypoint.sh /home/${USER}/app/
29-
RUN chmod +x /home/${USER}/app/rootless-entrypoint.sh
3029
RUN rm -rf /home/${USER}/app/node_modules/better-sqlite3
3130
COPY --from=builder /usr/src/app/node_modules/better-sqlite3 /home/${USER}/app/node_modules/better-sqlite3
3231
RUN chown -R ${USER}:${USER} /home/${USER}
@@ -45,6 +44,6 @@ ENV TRILIUM_DATA_DIR=/home/${USER}/trilium-data
4544
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
4645

4746
# Use the entrypoint script
48-
CMD /home/${USER}/app/rootless-entrypoint.sh
47+
CMD [ "bash", "./rootless-entrypoint.sh" ]
4948

5049
HEALTHCHECK --start-period=10s CMD node /home/${USER}/app/docker_healthcheck.js

apps/server/Dockerfile.rootless

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ WORKDIR /home/${USER}/app
2828
COPY ./dist /home/${USER}/app
2929
# Also copy the rootless entrypoint script
3030
COPY rootless-entrypoint.sh /home/${USER}/app/
31-
RUN chmod +x /home/${USER}/app/rootless-entrypoint.sh
3231
RUN rm -rf /home/${USER}/app/node_modules/better-sqlite3
3332
COPY --from=builder /usr/src/app/node_modules/better-sqlite3 /home/${USER}/app/node_modules/better-sqlite3
3433
RUN chown -R ${USER}:${USER} /home/${USER}
@@ -44,6 +43,6 @@ ENV TRILIUM_GID=${GID}
4443
ENV TRILIUM_DATA_DIR=/home/${USER}/trilium-data
4544

4645
# Use the entrypoint script
47-
CMD /home/${USER}/app/rootless-entrypoint.sh
46+
CMD [ "bash", "./rootless-entrypoint.sh" ]
4847

4948
HEALTHCHECK --start-period=10s CMD node /home/${USER}/app/docker_healthcheck.js

apps/server/rootless-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/sh
1+
#!/bin/bash
22
# Rootless entrypoint script for Trilium Notes
33
# Works with both Debian and Alpine-based images
44

0 commit comments

Comments
 (0)