slim down image: python:3.10-slim base + python-based healthcheck
ci/woodpecker/push/woodpecker Pipeline was canceled
ci/woodpecker/push/woodpecker Pipeline was canceled
Base python:3.10 (917MB) dominated the 986MB image and kaniko's snapshot/push time. All deps are pure-python/wheels, so slim works without build tools. Replace the curl healthcheck (curl absent in slim) with a stdlib urllib check. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
191e994572
commit
e81722b8d2
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -1,4 +1,4 @@
|
||||
FROM python:3.10
|
||||
FROM python:3.10-slim
|
||||
|
||||
#
|
||||
WORKDIR /code
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ services:
|
||||
- OFFICE_XBOT_VIEW_ID=${OFFICE_XBOT_VIEW_ID}
|
||||
- TZ=Asia/Shanghai
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/index"]
|
||||
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://127.0.0.1:8080/index')"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
|
||||
Reference in new issue
Block a user