Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid warning by setting SYNC_PORT as ARG in Dockerfile #3675

Merged
merged 3 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ hideo aoyama <https://github.com/boukendesho>
Ross Brown <[email protected]>
🦙 <github.com/iamllama>
Lukas Sommer <[email protected]>
Omar Kohl <[email protected]>

********************

Expand Down
4 changes: 3 additions & 1 deletion docs/syncserver/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ anki-sync-server

FROM alpine:3.20.2

ARG SYNC_PORT=8080

RUN adduser -D -h /home/anki anki

COPY --from=builder /anki-server/bin/anki-sync-server /usr/local/bin/anki-sync-server
Expand All @@ -20,7 +22,7 @@ RUN apk update && apk add --no-cache bash && rm -rf /var/cache/apk/*

USER anki

ENV SYNC_PORT=${SYNC_PORT:-"8080"}
ENV SYNC_PORT=${SYNC_PORT}

EXPOSE ${SYNC_PORT}

Expand Down
6 changes: 4 additions & 2 deletions docs/syncserver/Dockerfile.distroless
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ anki-sync-server

FROM gcr.io/distroless/cc-debian12

ARG SYNC_PORT=8080

COPY --from=builder /anki-server/bin/anki-sync-server /usr/bin/anki-sync-server

ENV SYNC_PORT=${SYNC_PORT:-"8080"}
ENV SYNC_PORT=${SYNC_PORT}

EXPOSE ${SYNC_PORT}

Expand All @@ -24,4 +26,4 @@ CMD ["anki-sync-server"]
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD ["anki-sync-server", "--healthcheck"]

LABEL maintainer="Jean Khawand <[email protected]>"
LABEL maintainer="Jean Khawand <[email protected]>"