Initial release

This commit is contained in:
Deon George 2016-08-22 12:11:35 +10:00
commit 9143b5c0ba
2 changed files with 58 additions and 0 deletions

40
.gitlab-ci.yml Normal file
View File

@ -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

18
Dockerfile Normal file
View File

@ -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;" ]