mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
fix(docker): fix when we copy and chmod the entrypoint for rootless images
This commit is contained in:
parent
436fc4c943
commit
093cd5c53f
@ -24,6 +24,9 @@ RUN apk add --no-cache dumb-init && \
|
|||||||
|
|
||||||
WORKDIR /home/${USER}/app
|
WORKDIR /home/${USER}/app
|
||||||
COPY ./dist /home/${USER}/app
|
COPY ./dist /home/${USER}/app
|
||||||
|
# Also copy the rootless entrypoint script
|
||||||
|
COPY rootless-entrypoint.sh /home/${USER}/app/
|
||||||
|
RUN chmod +x /home/${USER}/app/rootless-entrypoint.sh
|
||||||
RUN rm -rf /home/${USER}/app/node_modules/better-sqlite3
|
RUN rm -rf /home/${USER}/app/node_modules/better-sqlite3
|
||||||
COPY --from=builder /usr/src/app/node_modules/better-sqlite3 /home/${USER}/app/node_modules/better-sqlite3
|
COPY --from=builder /usr/src/app/node_modules/better-sqlite3 /home/${USER}/app/node_modules/better-sqlite3
|
||||||
RUN chown -R ${USER}:${USER} /home/${USER}
|
RUN chown -R ${USER}:${USER} /home/${USER}
|
||||||
@ -41,10 +44,6 @@ ENV TRILIUM_DATA_DIR=/home/${USER}/trilium-data
|
|||||||
# Use dumb-init as entrypoint to handle signals properly
|
# Use dumb-init as entrypoint to handle signals properly
|
||||||
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
||||||
|
|
||||||
# Copy the entrypoint script
|
|
||||||
COPY rootless-entrypoint.sh /home/${USER}/app/
|
|
||||||
RUN chmod +x /home/${USER}/app/rootless-entrypoint.sh
|
|
||||||
|
|
||||||
# Use the entrypoint script
|
# Use the entrypoint script
|
||||||
CMD ["/home/${USER}/app/rootless-entrypoint.sh"]
|
CMD ["/home/${USER}/app/rootless-entrypoint.sh"]
|
||||||
|
|
||||||
|
@ -26,6 +26,9 @@ RUN rm -rf \
|
|||||||
|
|
||||||
WORKDIR /home/${USER}/app
|
WORKDIR /home/${USER}/app
|
||||||
COPY ./dist /home/${USER}/app
|
COPY ./dist /home/${USER}/app
|
||||||
|
# Also copy the rootless entrypoint script
|
||||||
|
COPY rootless-entrypoint.sh /home/${USER}/app/
|
||||||
|
RUN chmod +x /home/${USER}/app/rootless-entrypoint.sh
|
||||||
RUN rm -rf /home/${USER}/app/node_modules/better-sqlite3
|
RUN rm -rf /home/${USER}/app/node_modules/better-sqlite3
|
||||||
COPY --from=builder /usr/src/app/node_modules/better-sqlite3 /home/${USER}/app/node_modules/better-sqlite3
|
COPY --from=builder /usr/src/app/node_modules/better-sqlite3 /home/${USER}/app/node_modules/better-sqlite3
|
||||||
RUN chown -R ${USER}:${USER} /home/${USER}
|
RUN chown -R ${USER}:${USER} /home/${USER}
|
||||||
@ -40,10 +43,6 @@ ENV TRILIUM_UID=${UID}
|
|||||||
ENV TRILIUM_GID=${GID}
|
ENV TRILIUM_GID=${GID}
|
||||||
ENV TRILIUM_DATA_DIR=/home/${USER}/trilium-data
|
ENV TRILIUM_DATA_DIR=/home/${USER}/trilium-data
|
||||||
|
|
||||||
# Copy the entrypoint script
|
|
||||||
COPY rootless-entrypoint.sh /home/${USER}/app/
|
|
||||||
RUN chmod +x /home/${USER}/app/rootless-entrypoint.sh
|
|
||||||
|
|
||||||
# Use the entrypoint script
|
# Use the entrypoint script
|
||||||
CMD ["/home/${USER}/app/rootless-entrypoint.sh"]
|
CMD ["/home/${USER}/app/rootless-entrypoint.sh"]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user