commit f13412fa1ec05a5fd43f7adf17cfe52a5342aa75 Author: Deon George Date: Fri Jul 21 23:53:55 2017 +1000 Initial release diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..abccb32 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +image: docker:latest + +stages: +- test +- build + +variables: + VERSION: latest + DOCKER_IMAGE: graytech/otrs + DOCKER_REGISTRY: registry.leenooks.net + DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375 + +services: +- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind + +before_script: +- docker info +- docker version +- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} + +test: + stage: test + script: + - cat /etc/hosts + - env|sort + - docker build -t ${DOCKER_IMAGE}:${VERSION} . + - docker images + only: + - debug + +build: + stage: build + script: + - chmod 500 init + - docker build -t ${DOCKER_IMAGE}:${VERSION} . + - docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION} + - docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION} + tags: + - docker + only: + - master diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8b6751e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# NAME graytech/otrs +# VERSION 5.0.12 +# BUILD docker build -t="leenooks/otrs" . +# SETUP su otrs -s /bin/bash -c /opt/otrs/bin/otrs.RebuildConfig.pl +# START docker run ... +# ftp://ftp.otrs.org/pub/otrs/packages/FAQ-5.0.3.opm +# ftp://ftp.otrs.org/pub/otrs/packages/iPhoneHandle-4.0.2.opm + +FROM registry.leenooks.net/leenooks/lamps:php70 + +# EPEL & Leenooks packages +RUN yum -y install \ + http://ftp.otrs.org/pub/otrs/RPMS/rhel/7/otrs-5.0.21-02.noarch.rpm \ + && yum clean all && rm -rf /var/tmp/* + +COPY firststart.sh /usr/local/sbin diff --git a/firststart.sh b/firststart.sh new file mode 100755 index 0000000..70efdf4 --- /dev/null +++ b/firststart.sh @@ -0,0 +1,4 @@ +#!/bin/sh +su otrs -lc "bin/otrs.Console.pl Maint::Config::Rebuild; sleep 15; bin/otrs.Console.pl Admin::Package::ReinstallAll" +/usr/sbin/crond +/opt/otrs/bin/Cron.sh start otrs