Dockerfile 480 B

1234567891011121314151617181920212223242526272829303132
  1. FROM alpine:3.20.0 as build
  2. RUN apk add --no-cache \
  3. cmake \
  4. gcc \
  5. git \
  6. libmilter-dev \
  7. make \
  8. musl-dev
  9. COPY . /milterfrom
  10. WORKDIR /milterfrom
  11. RUN mkdir build \
  12. && cd build \
  13. && cmake -DWITH_SYSTEMD=OFF .. \
  14. && make
  15. FROM alpine:3.20.0 as service
  16. RUN adduser -S milterfrom \
  17. && apk add libmilter
  18. COPY --from=build /milterfrom/build/milterfrom /usr/local/bin/
  19. USER milterfrom
  20. EXPOSE 8890/tcp
  21. CMD ["milterfrom", "-s", "inet:8890"]