added windows style new line clean up to all script files and linux resources.

This commit is contained in:
2025-10-22 19:09:15 +02:00
parent f33324e9f8
commit 4e21b1372f

View File

@@ -11,6 +11,8 @@ RUN set -eux && \
echo "Installing tools" && \
apt-get install -y -qq \
curl unzip cron ca-certificates logrotate dos2unix && \
echo "Remove exim" && \
apt-get remove -y -qq exim4 exim4-base exim4-daemon-light && \
echo "Cleaning up" && \
apt-get --yes autoremove --purge && \
apt-get clean --yes && \
@@ -19,9 +21,6 @@ RUN set -eux && \
rm --recursive --force --verbose /var/tmp/* && \
rm --recursive --force --verbose /var/cache/apt/archives/* && \
truncate --size 0 /var/log/*log
COPY ./docker/cron-bun-log /etc/logrotate.d/
COPY ./docker/Crontab /etc/cron.d/
RUN chmod 0644 /etc/cron.d/Crontab
# install BunJs
RUN curl -fsSL https://bun.com/install | bash
@@ -43,16 +42,22 @@ RUN cd /temp/prod && bun install --frozen-lockfile --production
# then copy all (non-ignored) project files into the image
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules node_modules
COPY . ./
COPY . .
# [optional] tests & build
# copy production dependencies and source code into final image
FROM base AS release
ENV NODE_ENV=production
COPY --from=install /temp/prod/node_modules node_modules
COPY . ./
COPY ./docker/docker-entrypoint.sh /opt/app/docker-entrypoint.sh
#COPY --from=prerelease .entrypoint.sh .
RUN dos2unix /opt/app/docker-entrypoint.sh && \
chmod +x /opt/app/docker-entrypoint.sh
ENTRYPOINT [ "/opt/app/docker-entrypoint.sh" ]
# COPY ./docker/cron-bun-log /etc/logrotate.d/
COPY ./docker/Crontab /etc/cron.d/
RUN chmod 0644 /etc/cron.d/Crontab && \
chown root:root /etc/cron.d/Crontab
COPY . .
RUN dos2unix \
/opt/app/docker/docker-entrypoint.sh \
/opt/app/run-task.sh \
/etc/cron.d/Crontab
RUN chmod +x /opt/app/docker/docker-entrypoint.sh && \
chmod +x /opt/app/run-task.sh
ENTRYPOINT [ "/opt/app/docker/docker-entrypoint.sh" ]