2021-03-03 19:28:03 +00:00
|
|
|
# note: zammad is currently incompatible to alpine because of:
|
2019-02-15 15:11:49 +00:00
|
|
|
# https://github.com/docker-library/ruby/issues/113
|
2022-06-21 10:28:31 +00:00
|
|
|
FROM ruby:3.0.4-slim AS builder
|
2019-02-15 15:11:49 +00:00
|
|
|
|
2016-12-17 11:10:51 +00:00
|
|
|
ARG BUILD_DATE
|
2019-02-15 15:11:49 +00:00
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2016-12-17 11:10:51 +00:00
|
|
|
|
2017-12-07 14:20:21 +00:00
|
|
|
ENV GIT_BRANCH stable
|
2019-02-15 15:11:49 +00:00
|
|
|
ENV GIT_URL ${PROJECT_URL}.git
|
|
|
|
ENV PROJECT_URL https://github.com/zammad/zammad
|
|
|
|
ENV RAILS_ENV production
|
2021-03-26 21:58:00 +00:00
|
|
|
ENV RAILS_LOG_TO_STDOUT true
|
2019-02-15 15:11:49 +00:00
|
|
|
ENV TAR_GZ_URL ${PROJECT_URL}/archive/${GIT_BRANCH}.tar.gz
|
|
|
|
ENV ZAMMAD_DIR /opt/zammad
|
2017-12-07 14:20:21 +00:00
|
|
|
ENV ZAMMAD_READY_FILE ${ZAMMAD_DIR}/tmp/zammad.ready
|
2019-02-15 15:11:49 +00:00
|
|
|
ENV ZAMMAD_TMP_DIR /tmp/zammad-${GIT_BRANCH}
|
|
|
|
ENV ZAMMAD_USER zammad
|
|
|
|
|
2020-02-26 23:33:46 +00:00
|
|
|
SHELL ["/bin/bash", "-e", "-o", "pipefail", "-c"]
|
|
|
|
|
2019-02-15 15:11:49 +00:00
|
|
|
# install zammad
|
|
|
|
COPY containers/zammad/setup.sh /tmp
|
|
|
|
RUN chmod +x /tmp/setup.sh; \
|
2021-03-03 19:28:03 +00:00
|
|
|
/tmp/setup.sh builder
|
2019-02-15 15:11:49 +00:00
|
|
|
|
|
|
|
|
2022-06-21 10:28:31 +00:00
|
|
|
FROM ruby:3.0.4-slim
|
2019-02-15 15:11:49 +00:00
|
|
|
|
|
|
|
ARG BUILD_DATE
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
2017-01-07 12:52:50 +00:00
|
|
|
|
2016-12-17 11:10:51 +00:00
|
|
|
LABEL org.label-schema.build-date="$BUILD_DATE" \
|
|
|
|
org.label-schema.name="Zammad" \
|
|
|
|
org.label-schema.license="AGPL-3.0" \
|
2017-01-12 13:14:25 +00:00
|
|
|
org.label-schema.description="Docker container for Zammad - Data Container" \
|
2016-12-17 11:10:51 +00:00
|
|
|
org.label-schema.url="https://zammad.org" \
|
|
|
|
org.label-schema.vcs-url="https://github.com/zammad/zammad" \
|
|
|
|
org.label-schema.vcs-type="Git" \
|
|
|
|
org.label-schema.vendor="Zammad" \
|
2022-11-04 00:09:50 +00:00
|
|
|
org.label-schema.schema-version="5.2.3" \
|
2017-01-06 14:11:05 +00:00
|
|
|
org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up"
|
2016-12-17 11:10:51 +00:00
|
|
|
|
2019-02-15 15:11:49 +00:00
|
|
|
ENV GIT_BRANCH stable
|
|
|
|
ENV RAILS_ENV production
|
2021-03-26 21:58:00 +00:00
|
|
|
ENV RAILS_LOG_TO_STDOUT true
|
2019-02-15 15:11:49 +00:00
|
|
|
ENV ZAMMAD_DIR /opt/zammad
|
|
|
|
ENV ZAMMAD_READY_FILE ${ZAMMAD_DIR}/tmp/zammad.ready
|
|
|
|
ENV ZAMMAD_TMP_DIR /tmp/zammad-${GIT_BRANCH}
|
|
|
|
ENV ZAMMAD_USER zammad
|
2017-12-03 18:41:55 +00:00
|
|
|
|
2019-02-15 15:11:49 +00:00
|
|
|
COPY containers/zammad/setup.sh /tmp
|
|
|
|
RUN chmod +x /tmp/setup.sh; \
|
2021-03-03 19:28:03 +00:00
|
|
|
/tmp/setup.sh runner
|
2019-02-15 15:11:49 +00:00
|
|
|
|
|
|
|
COPY --from=builder ${ZAMMAD_TMP_DIR} ${ZAMMAD_TMP_DIR}
|
|
|
|
COPY --from=builder /usr/local/bundle /usr/local/bundle
|
2017-07-21 12:21:32 +00:00
|
|
|
|
2017-10-02 21:41:16 +00:00
|
|
|
# docker init
|
|
|
|
COPY containers/zammad/docker-entrypoint.sh /
|
2017-11-20 22:59:01 +00:00
|
|
|
RUN chmod +x /docker-entrypoint.sh
|
2017-10-02 21:41:16 +00:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
|
2021-03-03 19:28:03 +00:00
|
|
|
USER zammad
|
|
|
|
|
2017-07-22 16:34:20 +00:00
|
|
|
WORKDIR ${ZAMMAD_DIR}
|