Added .gitlab-ci.yml to auto build container

This commit is contained in:
Deon George 2016-07-07 23:04:28 +10:00
parent dfbd5e7ef4
commit dd2854b5ea

View File

@ -1,14 +1,25 @@
image: docker:latest image: leenooks/ci-docker:latest
stages:
- build
services: services:
- docker:dind - leenooks/ci-docker:dind
variables:
REGISTRY: registry.leenooks.net
IMAGE: leenooks/base
before_script: before_script:
- docker info - docker info
- df - docker version
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY}
build: build:
stage: build stage: build
script: script:
- docker build -t registry.leenooks.net/leenooks/base . - docker build -t ${IMAGE} .
- docker push registry.leenooks.net/leenooks/base - docker tag ${IMAGE} ${REGISTRY}/${IMAGE}
- docker push ${REGISTRY}/${IMAGE}
tags:
- docker