feat: sentry for arm
Some checks failed
Lock closed issues/PRs / lock (push) Has been cancelled
Test / Sentry self-hosted end-to-end tests (push) Has been cancelled
Test / unit tests (push) Has been cancelled
Test / Sentry upgrade test (push) Has been cancelled
Test / integration test v2.19.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.19.0 - customizations enabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations enabled (push) Has been cancelled
Some checks failed
Lock closed issues/PRs / lock (push) Has been cancelled
Test / Sentry self-hosted end-to-end tests (push) Has been cancelled
Test / unit tests (push) Has been cancelled
Test / Sentry upgrade test (push) Has been cancelled
Test / integration test v2.19.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.19.0 - customizations enabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations disabled (push) Has been cancelled
Test / integration test v2.26.0 - customizations enabled (push) Has been cancelled
Signed-off-by: 小草林(田梓萱) <xcl@xuegao-tzx.top>
This commit is contained in:
9
cron/Dockerfile
Normal file
9
cron/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
ARG BASE_IMAGE
|
||||
FROM ${BASE_IMAGE}
|
||||
USER 0
|
||||
RUN if [ -n "${http_proxy}" ]; then echo "Acquire::http::proxy \"${http_proxy}\";" >> /etc/apt/apt.conf; fi
|
||||
RUN if [ -n "${https_proxy}" ]; then echo "Acquire::https::proxy \"${https_proxy}\";" >> /etc/apt/apt.conf; fi
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends cron && \
|
||||
rm -r /var/lib/apt/lists/*
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
19
cron/entrypoint.sh
Executable file
19
cron/entrypoint.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if [ "$(ls -A /usr/local/share/ca-certificates/)" ]; then
|
||||
update-ca-certificates
|
||||
fi
|
||||
|
||||
# Prior art:
|
||||
# - https://github.com/renskiy/cron-docker-image/blob/5600db37acf841c6d7a8b4f3866741bada5b4622/debian/start-cron#L34-L36
|
||||
# - https://blog.knoldus.com/running-a-cron-job-in-docker-container/
|
||||
|
||||
declare -p | grep -Ev 'BASHOPTS|BASH_VERSINFO|EUID|PPID|SHELLOPTS|UID' >/container.env
|
||||
|
||||
{ for cron_job in "$@"; do echo -e "SHELL=/bin/bash
|
||||
BASH_ENV=/container.env
|
||||
${cron_job} > /proc/1/fd/1 2>/proc/1/fd/2"; done; } |
|
||||
sed --regexp-extended 's/\\(.)/\1/g' |
|
||||
crontab -
|
||||
crontab -l
|
||||
exec cron -f -l -L 15
|
Reference in New Issue
Block a user