Dockerfile 892 B

123456789101112131415161718192021222324252627282930
  1. FROM node:20-slim as node
  2. FROM ruby:3.2.4-slim AS builder
  3. ARG DEBIAN_FRONTEND=noninteractive
  4. ARG RAILS_ENV=production
  5. ARG ZAMMAD_DIR=/opt/zammad
  6. COPY --from=node /opt /opt
  7. COPY --from=node /usr/local/bin /usr/local/bin
  8. SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
  9. WORKDIR ${ZAMMAD_DIR}
  10. COPY . .
  11. RUN contrib/docker/setup.sh builder
  12. # note: zammad is currently incompatible to alpine because of:
  13. # https://github.com/docker-library/ruby/issues/113
  14. FROM ruby:3.2.4-slim
  15. ARG DEBIAN_FRONTEND=noninteractive
  16. ARG ZAMMAD_USER=zammad
  17. ENV RAILS_ENV=production
  18. ENV RAILS_LOG_TO_STDOUT=true
  19. ENV ZAMMAD_DIR=/opt/zammad
  20. WORKDIR ${ZAMMAD_DIR}
  21. COPY --from=builder ${ZAMMAD_DIR} .
  22. COPY --from=builder /usr/local/bundle /usr/local/bundle
  23. COPY --from=builder ${ZAMMAD_DIR}/contrib/docker/docker-entrypoint.sh /
  24. RUN contrib/docker/setup.sh runner
  25. USER zammad:zammad
  26. ENTRYPOINT ["/docker-entrypoint.sh"]