mirror of
https://github.com/rustmailer/bichon.git
synced 2026-08-03 07:48:34 +02:00
37 lines
1.1 KiB
Docker
37 lines
1.1 KiB
Docker
# Use Debian bullseye-slim as the base image for newer OpenSSL
|
|
FROM ubuntu:24.04
|
|
ARG CRATE_VERSION
|
|
|
|
# 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)
|
|
COPY bichon /opt/bichon/bichon
|
|
COPY LICENSE /opt/bichon/
|
|
# Set proper permissions
|
|
RUN chmod +x /opt/bichon/bichon
|
|
|
|
# Install ca-certificates to ensure HTTPS certificate verification works correctly
|
|
RUN apt update && apt install -y ca-certificates && rm -rf /var/lib/apt/lists/*
|
|
RUN apt update && apt install -y ca-certificates curl && rm -rf /var/lib/apt/lists/*
|
|
|
|
# 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 \
|
|
CMD curl -fs http://localhost:15630/api/status || exit 1
|
|
|
|
# Entrypoint remains the binary
|
|
CMD ["/opt/bichon/bichon"]
|