aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2026-02-28 05:03:14 -0800
committerFuwn <[email protected]>2026-02-28 05:03:14 -0800
commite4196fd73aab0898daa5b66b9d8113f7fd1e89bd (patch)
tree5176473e22728f13cde12fb81ade8a7cf4e0d83e
parentdocs: refine user-facing wording for clarity and consistency (diff)
downloadplutia-test-e4196fd73aab0898daa5b66b9d8113f7fd1e89bd.tar.xz
plutia-test-e4196fd73aab0898daa5b66b9d8113f7fd1e89bd.zip
chore(docker): use alpine runtime and shell healthcheck
-rw-r--r--Dockerfile4
-rw-r--r--docker-compose.yml6
2 files changed, 7 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 0bee4c1..8431c5d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -16,11 +16,11 @@ COPY . .
RUN go build -trimpath -ldflags="-s -w -X main.version=${VERSION} -X main.commit=${COMMIT} -X main.buildDate=${BUILD_DATE}" -o plutia ./cmd/plutia
-FROM gcr.io/distroless/base-debian12
+FROM alpine:3.20
WORKDIR /app
-USER 1000:1000
+RUN apk add --no-cache ca-certificates tzdata
COPY --from=builder /app/plutia /app/plutia
diff --git a/docker-compose.yml b/docker-compose.yml
index a61454f..36b9a1f 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -36,7 +36,11 @@ services:
- ./config.yaml:/etc/plutia/config.yaml:ro
- ./data:/var/lib/plutia
healthcheck:
- test: ["CMD", "wget", "-q", "-O-", "http://127.0.0.1:8080/health"]
+ test:
+ [
+ "CMD-SHELL",
+ "wget -q -O- http://127.0.0.1:8080/health >/dev/null || exit 1",
+ ]
interval: 30s
timeout: 5s
retries: 5