commit 9143b5c0ba7b6767facdf52979fa2218a5963add Author: Deon George Date: Mon Aug 22 12:11:35 2016 +1000 Initial release diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..74bbb9e --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,40 @@ +image: docker:latest + +stages: +- test +- build + +variables: + VERSION: latest + DOCKER_IMAGE: leenooks/nginx + 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: + - 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..beb54c5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ +# NAME leenooks/nginx +# VERSION latest +# BUILD docker build -t="leenooks/nginx" . +# START docker run -dp 80:80 -p 443:433 -v /srv/nginx/conf.d:/etc/nginx/conf.d [-v /srv/nginx/default.d:/etc/nginx/default.d] [--link web] --restart=always --name=nginx leenooks/nginx + +FROM registry.leenooks.net/leenooks/base:7 + +RUN yum -y install epel-release && yum clean all +RUN yum -y install ln-nginx && yum clean all + +EXPOSE 80 443 + +# Expose our web root and log directories log. +#VOLUME [ "/etc/nginx/conf.d", "/etc/nginx/default.d" ] + +# Starting +ENTRYPOINT [ "/usr/sbin/nginx" ] +CMD [ "-g daemon off;" ]