diff --git a/docs/syncserver/Dockerfile b/docs/syncserver/Dockerfile index 72bb9ba4b5f..8482f0e1c0e 100644 --- a/docs/syncserver/Dockerfile +++ b/docs/syncserver/Dockerfile @@ -1,14 +1,14 @@ -FROM rust:1.76-alpine3.19 AS builder +FROM rust:1.79-alpine3.20 AS builder ARG ANKI_VERSION="23.12.1" RUN apk update && apk add --no-cache build-base protobuf && rm -rf /var/cache/apk/* RUN cargo install --git https://github.com/ankitects/anki.git \ - --tag ${ANKI_VERSION} \ - --root /anki-server \ - anki-sync-server +--tag ${ANKI_VERSION} \ +--root /anki-server \ +anki-sync-server -FROM alpine:3.19.1 +FROM alpine:3.20 RUN adduser -D -h /home/anki anki @@ -25,8 +25,9 @@ EXPOSE ${SYNC_PORT} CMD ["anki-sync-server"] -# TODO - consider exposing endpoint /health to check on health cause currently it will return 404 error -# HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ -# CMD wget -qO- http://localhost:${SYNC_PORT} || exit 1 +# This health check will work for Anki versions 24.06.3 and newer. +# For older versions, it may incorrectly report an unhealthy status, which should not be the case. +HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \ + CMD wget -qO- http://localhost:${SYNC_PORT}/health || exit 1 LABEL maintainer="Jean Khawand " \ No newline at end of file