Skip to content

Commit 01bc32f

Browse files
committed
Fixed script execution permissions for Docker image entrypoint
1 parent 8968228 commit 01bc32f

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docker/scripts/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ RUN --mount=type=cache,target=.npm \
2525
npm set cache .npm && \
2626
npm ci && chown -R node:node ./node_modules
2727

28-
# Add a cronjob for log rotation and build the project
29-
RUN echo "0 0 * * * logrotate -f /usr/src/app/docker/configuration/logrotate.conf -s /usr/src/app/docker/configuration/logrotate.status > /dev/null 2>&1" >> /var/spool/cron/crontabs/node && \
30-
chmod 644 /usr/src/app/docker/configuration/logrotate.conf && \
31-
npm run build && chown -R node:node .next
28+
# Add some cronjobs for automated tasks
29+
RUN echo "0 0 * * * logrotate -f /usr/src/app/docker/configuration/logrotate.conf -s /usr/src/app/docker/configuration/logrotate.status > /dev/null 2>&1" >> /var/spool/cron/crontabs/node
3230

3331
# Use non-root user
3432
USER node
3533

36-
# Remove all development dependencies
37-
RUN npm prune --production
34+
# Prepare project files and configuration to be built
35+
RUN npm run build && npm prune --production && \
36+
chmod +x ./docker/scripts/entrypoint.sh && \
37+
chmod 644 /usr/src/app/docker/configuration/logrotate.conf

0 commit comments

Comments
 (0)