2024-07-11 02:15:52 +08:00
|
|
|
FROM --platform=$BUILDPLATFORM alpine:latest
|
2024-07-21 13:33:15 +08:00
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
RUN apk --no-cache add ca-certificates tzdata shadow su-exec
|
|
|
|
|
|
|
|
# Set the working directory
|
2019-07-12 16:20:44 +08:00
|
|
|
WORKDIR /listmonk
|
2024-07-21 13:33:15 +08:00
|
|
|
|
|
|
|
# Copy only the necessary files
|
2019-07-12 16:20:44 +08:00
|
|
|
COPY listmonk .
|
|
|
|
COPY config.toml.sample config.toml
|
2020-07-09 01:08:31 +08:00
|
|
|
COPY config-demo.toml .
|
2024-07-21 13:33:15 +08:00
|
|
|
|
|
|
|
# Copy the entrypoint script
|
|
|
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
|
|
|
|
|
|
# Make the entrypoint script executable
|
|
|
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
|
|
|
|
|
|
|
# Expose the application port
|
2021-02-20 01:34:09 +08:00
|
|
|
EXPOSE 9000
|
2024-07-21 13:33:15 +08:00
|
|
|
|
|
|
|
# Set the entrypoint
|
|
|
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
|
|
|
|
|
|
|
# Define the command to run the application
|
|
|
|
CMD ["./listmonk"]
|