added windows style new line clean up to all script files and linux resources.
This commit is contained in:
25
Dockerfile
25
Dockerfile
@@ -11,6 +11,8 @@ RUN set -eux && \
|
|||||||
echo "Installing tools" && \
|
echo "Installing tools" && \
|
||||||
apt-get install -y -qq \
|
apt-get install -y -qq \
|
||||||
curl unzip cron ca-certificates logrotate dos2unix && \
|
curl unzip cron ca-certificates logrotate dos2unix && \
|
||||||
|
echo "Remove exim" && \
|
||||||
|
apt-get remove -y -qq exim4 exim4-base exim4-daemon-light && \
|
||||||
echo "Cleaning up" && \
|
echo "Cleaning up" && \
|
||||||
apt-get --yes autoremove --purge && \
|
apt-get --yes autoremove --purge && \
|
||||||
apt-get clean --yes && \
|
apt-get clean --yes && \
|
||||||
@@ -19,9 +21,6 @@ RUN set -eux && \
|
|||||||
rm --recursive --force --verbose /var/tmp/* && \
|
rm --recursive --force --verbose /var/tmp/* && \
|
||||||
rm --recursive --force --verbose /var/cache/apt/archives/* && \
|
rm --recursive --force --verbose /var/cache/apt/archives/* && \
|
||||||
truncate --size 0 /var/log/*log
|
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
|
# install BunJs
|
||||||
RUN curl -fsSL https://bun.com/install | bash
|
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
|
# then copy all (non-ignored) project files into the image
|
||||||
FROM base AS prerelease
|
FROM base AS prerelease
|
||||||
COPY --from=install /temp/dev/node_modules node_modules
|
COPY --from=install /temp/dev/node_modules node_modules
|
||||||
COPY . ./
|
COPY . .
|
||||||
# [optional] tests & build
|
# [optional] tests & build
|
||||||
|
|
||||||
# copy production dependencies and source code into final image
|
# copy production dependencies and source code into final image
|
||||||
FROM base AS release
|
FROM base AS release
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
COPY --from=install /temp/prod/node_modules node_modules
|
COPY --from=install /temp/prod/node_modules node_modules
|
||||||
COPY . ./
|
# COPY ./docker/cron-bun-log /etc/logrotate.d/
|
||||||
COPY ./docker/docker-entrypoint.sh /opt/app/docker-entrypoint.sh
|
COPY ./docker/Crontab /etc/cron.d/
|
||||||
#COPY --from=prerelease .entrypoint.sh .
|
RUN chmod 0644 /etc/cron.d/Crontab && \
|
||||||
RUN dos2unix /opt/app/docker-entrypoint.sh && \
|
chown root:root /etc/cron.d/Crontab
|
||||||
chmod +x /opt/app/docker-entrypoint.sh
|
COPY . .
|
||||||
ENTRYPOINT [ "/opt/app/docker-entrypoint.sh" ]
|
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" ]
|
||||||
Reference in New Issue
Block a user