2025-11-19 02:14:37 +08:00
|
|
|
# Use Debian bullseye-slim as the base image for newer OpenSSL
|
|
|
|
|
FROM ubuntu:24.04
|
|
|
|
|
ARG CRATE_VERSION
|
2025-11-20 10:57:05 +08:00
|
|
|
ARG TARGETARCH
|
2025-11-19 02:14:37 +08:00
|
|
|
|
|
|
|
|
# Set maintainer metadata
|
|
|
|
|
LABEL maintainer="rustmailer <rustmailer.git@gmail.com>"
|
|
|
|
|
LABEL version="${CRATE_VERSION}"
|
|
|
|
|
LABEL description="Dockerized Bichon service"
|
|
|
|
|
|
|
|
|
|
# Set working directory
|
|
|
|
|
WORKDIR /opt/bichon
|
|
|
|
|
|
|
|
|
|
# Copy compiled binary (ensure it's statically linked or compatible with bullseye)
|
2026-05-15 10:07:02 +08:00
|
|
|
COPY ${TARGETARCH}/bichon-server /opt/bichon/bichon-server
|
2025-11-22 02:17:06 +08:00
|
|
|
COPY ${TARGETARCH}/LICENSE /opt/bichon/
|
2026-01-24 20:20:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
# cli tools
|
2026-05-15 10:07:02 +08:00
|
|
|
COPY ${TARGETARCH}/bichon-cli /usr/local/bin/bichon-cli
|
2026-01-24 20:20:18 +08:00
|
|
|
COPY ${TARGETARCH}/bichon-admin /usr/local/bin/bichon-admin
|
|
|
|
|
|
|
|
|
|
# Set permissions
|
2026-05-15 10:07:02 +08:00
|
|
|
RUN chmod +x /opt/bichon/bichon-server
|
|
|
|
|
RUN chmod +x /usr/local/bin/bichon-cli
|
2026-01-24 20:20:18 +08:00
|
|
|
RUN chmod +x /usr/local/bin/bichon-admin
|
2025-11-19 02:14:37 +08:00
|
|
|
|
2026-01-22 12:12:41 +11:00
|
|
|
|
2025-11-19 02:14:37 +08:00
|
|
|
# Install ca-certificates to ensure HTTPS certificate verification works correctly
|
2025-11-19 09:44:31 +08:00
|
|
|
RUN apt update && apt install -y ca-certificates curl && rm -rf /var/lib/apt/lists/*
|
2025-11-19 02:14:37 +08:00
|
|
|
# Create data directory
|
|
|
|
|
RUN mkdir -p /data
|
|
|
|
|
|
|
|
|
|
# Expose default ports
|
|
|
|
|
EXPOSE 15630
|
|
|
|
|
|
|
|
|
|
# Set volume and working directory
|
|
|
|
|
WORKDIR /data
|
|
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
2026-07-28 14:11:46 +08:00
|
|
|
CMD curl -fs http://localhost:${BICHON_HTTP_PORT:-15630}/api/status || exit 1
|
2025-11-19 02:14:37 +08:00
|
|
|
|
2026-05-15 10:07:02 +08:00
|
|
|
CMD ["/opt/bichon/bichon-server"]
|