diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 067834e..6ec9d98 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,18 +7,15 @@ stages: variables: VERSION: 9.0.1.9-9.0.1.20 CACHETAG: build - DOCKER_REGISTRY: registry.leenooks.net - DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375 + DOCKER_HOST: tcp://${CI_REGISTRY}-leenooks-ci-docker:2375 services: -- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind +- ${CI_REGISTRY}/leenooks/ci-docker:dind before_script: - docker info - docker version -- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} -- echo "CI_PROJECT_PATH ${CI_PROJECT_PATH} CI_COMMIT_TAG ${CI_COMMIT_TAG} CI_COMMIT_REF_NAME ${CI_COMMIT_REF_NAME}" -- echo "CI_REGISTRY ${CI_REGISTRY} CI_REGISTRY_IMAGE ${CI_REGISTRY_IMAGE} CI ${CI}" +- echo "$CI_JOB_TOKEN" | docker login -u "$CI_REGISTRY_USER" "$CI_REGISTRY" --password-stdin test: stage: test @@ -33,7 +30,8 @@ test: build: stage: build script: - - ( docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true ) && df + - if [ -f init ]; then chmod 500 init; fi + - docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . - docker push ${CI_REGISTRY_IMAGE}:${VERSION} - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} diff --git a/Dockerfile b/Dockerfile index 58a770b..3778b26 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,22 +1,28 @@ # NAME leenooks/domino # VERSION 9.0.1.9-9.0.1.20 -FROM registry.leenooks.net/leenooks/base:7 +FROM centos:7 RUN yum -y install unzip which perl glibc.i686 libgcc.i686 libgcc && yum clean all RUN groupadd -g 201 servers && useradd -u 202 -g 201 notes # Base Version of Domino & FP COPY response.dat response-fp.dat /tmp/ -RUN mkdir /tmp/domino && df && \ - cd /tmp/domino && curl -SL http://yum.leenooks.net/docker/domino/9.0.1 | tar xf - && cd /tmp/domino/linux64/domino && ./install -silent -options /tmp/response.dat && df && \ - cd /tmp/domino && curl -SL http://yum.leenooks.net/docker/domino/9.0.1.9 | tar xf - && cd /tmp/domino/linux64/domino && NUI_NOTESDIR=/opt/ibm/domino ./install -script /tmp/response-fp.dat && rm -rf /tmp/* && df +RUN mkdir /tmp/domino && cd /tmp/domino && \ + curl -SL http://yum.leenooks.net/docker/domino/9.0.1 | tar xf - && \ + cd /tmp/domino/linux64/domino && ./install -silent -options /tmp/response.dat && \ + cd /tmp/domino && \ + curl -SL http://yum.leenooks.net/docker/domino/9.0.1.9 | tar xf - && \ + cd /tmp/domino/linux64/domino && \ + NUI_NOTESDIR=/opt/ibm/domino ./install -script /tmp/response-fp.dat && rm -rf /tmp/* # TRAVELLER COPY response-tvl.dat /tmp/ RUN mkdir /tmp/domino && cd /tmp/domino && \ - curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.18 | tar xzf - && ./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && \ - curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.20 | tar xzf - && ./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && rm -rf /tmp/* && df + curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.18 | tar xzf - && \ + ./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && \ + curl -SL http://yum.leenooks.net/docker/traveler/9.0.1.20 | tar xzf - && \ + ./TravelerSetup -f /tmp/response-tvl.dat -i SILENT -l en && rm -rf /tmp/* COPY domino.sh /usr/local/sbin/ EXPOSE 25 80 110 143 443 465 993 995 1352 diff --git a/domino.sh b/domino.sh index 315ef97..f4f9b7b 100755 --- a/domino.sh +++ b/domino.sh @@ -39,6 +39,10 @@ case "$1" in ulimit -n 60000 fi + # Change our primary interface address for traveler + OURIP=$(ip route get $(ip route show 0.0.0.0/0 | grep -oP 'via \K\S+') | grep -oP 'src \K\S+') + sed -i -r "s/^(NTS_HOST_IP_ADDR)=[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/\1=${OURIP}/" notes.ini + echo -n "Starting Domino server" start & wait