mirror of
https://github.com/acmesh-official/acme.sh.git
synced 2025-05-05 23:17:41 +00:00
docker: for better maintenance
This commit is contained in:
parent
5b8d7a3f29
commit
5c4d1ec035
5
.github/workflows/dockerhub.yml
vendored
5
.github/workflows/dockerhub.yml
vendored
@ -8,10 +8,9 @@ on:
|
||||
- '*'
|
||||
paths:
|
||||
- '**.sh'
|
||||
- "Dockerfile"
|
||||
- "docker/**"
|
||||
- '.github/workflows/dockerhub.yml'
|
||||
|
||||
|
||||
jobs:
|
||||
CheckToken:
|
||||
runs-on: ubuntu-latest
|
||||
@ -30,7 +29,7 @@ jobs:
|
||||
fi
|
||||
- name: Check the value
|
||||
run: echo ${{ steps.step_one.outputs.hasToken }}
|
||||
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: CheckToken
|
||||
|
@ -62,14 +62,7 @@ RUN for verb in help \
|
||||
printf -- "%b" "#!/usr/bin/env sh\n/root/.acme.sh/acme.sh --${verb} --config-home /acme.sh \"\$@\"" >/usr/local/bin/--${verb} && chmod +x /usr/local/bin/--${verb} \
|
||||
; done
|
||||
|
||||
RUN printf "%b" '#!'"/usr/bin/env sh\n \
|
||||
if [ \"\$1\" = \"daemon\" ]; then \n \
|
||||
trap \"echo stop && killall crond && exit 0\" SIGTERM SIGINT \n \
|
||||
crond && sleep infinity &\n \
|
||||
wait \n \
|
||||
else \n \
|
||||
exec -- \"\$@\"\n \
|
||||
fi" >/entry.sh && chmod +x /entry.sh
|
||||
COPY entry.sh /
|
||||
|
||||
VOLUME /acme.sh
|
||||
|
9
docker/entry.sh
Executable file
9
docker/entry.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ "$1" = "daemon" ]; then
|
||||
trap "echo stop && killall crond && exit 0" SIGTERM SIGINT
|
||||
crond && sleep infinity &
|
||||
wait
|
||||
else
|
||||
exec -- "$@"
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user