Update permissions and line endings in dockerfile (#410)

* Preliminary dockerization with scheduling

Porting working docker implementation (scheduling, etc.) into revised v2

* Update dockerfile to fix line endings for non-unix docker users

* Update dockerfile to fix line endings for non-unix docker users

* Update dockerfile permissions and line endings

Ensure proper permissions and line endings for all scripts for non-Unix docker users

---------

Co-authored-by: Netsky <56271887+TheNetsky@users.noreply.github.com>
This commit is contained in:
Michael Cammarata
2025-11-06 01:42:08 -05:00
committed by GitHub
parent 996d9485cd
commit bd96aeb20c

View File

@@ -79,12 +79,12 @@ COPY --from=builder /usr/src/microsoft-rewards-script/dist ./dist
COPY --from=builder /usr/src/microsoft-rewards-script/package*.json ./
COPY --from=builder /usr/src/microsoft-rewards-script/node_modules ./node_modules
# Copy runtime scripts with proper permissions from the start
# Copy runtime scripts with proper permissions and normalize line endings for non-Unix users
COPY --chmod=755 src/run_daily.sh ./src/run_daily.sh
COPY --chmod=644 src/crontab.template /etc/cron.d/microsoft-rewards-cron.template
COPY --chmod=755 entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod 755 /usr/local/bin/entrypoint.sh \
&& sed -i 's/\r$//' /usr/local/bin/entrypoint.sh
RUN sed -i 's/\r$//' /usr/local/bin/entrypoint.sh \
&& sed -i 's/\r$//' ./src/run_daily.sh
# Entrypoint handles TZ, initial run toggle, cron templating & launch
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]