diff options
| author | Fuwn <[email protected]> | 2026-02-28 05:03:14 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2026-02-28 05:03:14 -0800 |
| commit | e4196fd73aab0898daa5b66b9d8113f7fd1e89bd (patch) | |
| tree | 5176473e22728f13cde12fb81ade8a7cf4e0d83e | |
| parent | docs: refine user-facing wording for clarity and consistency (diff) | |
| download | plutia-test-e4196fd73aab0898daa5b66b9d8113f7fd1e89bd.tar.xz plutia-test-e4196fd73aab0898daa5b66b9d8113f7fd1e89bd.zip | |
chore(docker): use alpine runtime and shell healthcheck
| -rw-r--r-- | Dockerfile | 4 | ||||
| -rw-r--r-- | docker-compose.yml | 6 |
2 files changed, 7 insertions, 3 deletions
@@ -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 |