modified: src/Dockerfile
modified: src/entrypoint.sh deleted: src/update-ca.sh
This commit is contained in:
parent
a95d1bf44f
commit
df9c72c9ce
3 changed files with 36 additions and 13 deletions
|
@ -9,6 +9,6 @@ ENV XDG_CACHE_HOME=/cache
|
||||||
|
|
||||||
VOLUME ["/usr/local/share/ca-certificates"]
|
VOLUME ["/usr/local/share/ca-certificates"]
|
||||||
|
|
||||||
ENTRYPOINT ["./update-ca.sh"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
|
|
||||||
CMD ["./entrypoint.sh"]
|
CMD []
|
||||||
|
|
|
@ -1,11 +1,38 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Dump all env vars so we can source them in cron jobs
|
set -e
|
||||||
printenv | sed 's/^\(.*\)$/export \1/g' > /env.sh
|
|
||||||
|
|
||||||
# Write crontab
|
setup_cacerts(){
|
||||||
rcb crontab > crontab
|
|
||||||
|
|
||||||
# start cron in the foreground
|
update-ca-certificates
|
||||||
crontab crontab
|
}
|
||||||
crond -f
|
|
||||||
|
dump_env(){
|
||||||
|
|
||||||
|
# Dump all env vars so we can source them in cron jobs
|
||||||
|
printenv | sed 's/^\(.*\)$/export \1/g' > /env.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
setup_crontab(){
|
||||||
|
|
||||||
|
# Write crontab
|
||||||
|
rcb crontab > crontab
|
||||||
|
|
||||||
|
# start cron in the foreground
|
||||||
|
crontab crontab
|
||||||
|
crond -f
|
||||||
|
}
|
||||||
|
|
||||||
|
start_app(){
|
||||||
|
|
||||||
|
setup_cacerts
|
||||||
|
|
||||||
|
if [ "$1" = '' ]; then
|
||||||
|
dump_env
|
||||||
|
setup_crontab
|
||||||
|
else
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
start_app "$@"
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# Update CA certificates
|
|
||||||
update-ca-certificates
|
|
Loading…
Add table
Reference in a new issue