FROM ruby:2.3.1 MAINTAINER Zammad ARG BUILD_DATE ENV ZAMMAD_DIR /home/zammad ENV RAILS_ENV production ENV RAILS_SERVER puma ENV GIT_URL https://github.com/zammad/zammad.git ENV GIT_BRANCH develop LABEL org.label-schema.build-date="$BUILD_DATE" \ org.label-schema.name="Zammad" \ org.label-schema.license="AGPL-3.0" \ org.label-schema.description="Docker container for Zammad" \ 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" \ org.label-schema.schema-version="1.2" \ org.label-schema.docker.cmd="sysctl -w vm.max_map_count=262144;docker-compose up" # Expose ports EXPOSE 3000 EXPOSE 6042 # add zammad user RUN useradd -m -d /home/zammad -s /bin/bash zammad;chown -R zammad:zammad /home/zammad # install zammad COPY install-zammad.sh /tmp RUN chmod +x /tmp/install-zammad.sh;/bin/bash -l -c /tmp/install-zammad.sh # docker init COPY docker-entrypoint.sh / RUN chown zammad:zammad /docker-entrypoint.sh;chmod +x /docker-entrypoint.sh USER zammad ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["zammad"]