Added .gitlab-ci.yml to auto build container
This commit is contained in:
parent
dfbd5e7ef4
commit
dd2854b5ea
@ -1,14 +1,25 @@
|
||||
image: docker:latest
|
||||
image: leenooks/ci-docker:latest
|
||||
|
||||
stages:
|
||||
- build
|
||||
|
||||
services:
|
||||
- docker:dind
|
||||
- leenooks/ci-docker:dind
|
||||
|
||||
variables:
|
||||
REGISTRY: registry.leenooks.net
|
||||
IMAGE: leenooks/base
|
||||
|
||||
before_script:
|
||||
- docker info
|
||||
- df
|
||||
- docker version
|
||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY}
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- docker build -t registry.leenooks.net/leenooks/base .
|
||||
- docker push registry.leenooks.net/leenooks/base
|
||||
- docker build -t ${IMAGE} .
|
||||
- docker tag ${IMAGE} ${REGISTRY}/${IMAGE}
|
||||
- docker push ${REGISTRY}/${IMAGE}
|
||||
tags:
|
||||
- docker
|
||||
|
Reference in New Issue
Block a user