Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
0aad13dc29 | ||
|
4bbc2fb76b | ||
|
025abc9d8e |
@ -1,25 +1,40 @@
|
|||||||
image: leenooks/ci-docker:latest
|
image: docker:latest
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- test
|
||||||
- build
|
- build
|
||||||
|
|
||||||
services:
|
|
||||||
- leenooks/ci-docker:dind
|
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
REGISTRY: registry.leenooks.net
|
VERSION: "6"
|
||||||
IMAGE: leenooks/base
|
DOCKER_IMAGE: leenooks/base
|
||||||
|
DOCKER_REGISTRY: registry.leenooks.net
|
||||||
|
DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375
|
||||||
|
|
||||||
|
services:
|
||||||
|
- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- docker info
|
- docker info
|
||||||
- docker version
|
- docker version
|
||||||
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${REGISTRY}
|
- 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:
|
build:
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- docker build -t ${IMAGE} .
|
- docker build -t ${DOCKER_IMAGE}:${VERSION} .
|
||||||
- docker tag ${IMAGE} ${REGISTRY}/${IMAGE}
|
- docker tag ${DOCKER_IMAGE}:${VERSION} ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
|
||||||
- docker push ${REGISTRY}/${IMAGE}
|
- docker push ${DOCKER_REGISTRY}/${DOCKER_IMAGE}:${VERSION}
|
||||||
tags:
|
tags:
|
||||||
- docker
|
- docker
|
||||||
|
only:
|
||||||
|
- c6
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
# NAME leenooks/base
|
# NAME leenooks/base
|
||||||
# VERSION latest
|
# VERSION 6
|
||||||
# BUILD docker build -t="leenooks/base" .
|
|
||||||
|
|
||||||
FROM centos:latest
|
FROM centos:6
|
||||||
MAINTAINER deon@leenooks.net
|
MAINTAINER deon@leenooks.net
|
||||||
|
|
||||||
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
|
RUN ln -sf /usr/share/zoneinfo/Australia/Melbourne /etc/localtime
|
||||||
RUN yum -y install http://yum.leenooks.net/repo-7.rpm && yum -y update && yum clean all && rm -rf /var/tmp/*
|
RUN yum -y install http://yum.leenooks.net/repo-6.rpm && yum -y update && yum clean all && rm -rf /var/tmp/*
|
||||||
|
Reference in New Issue
Block a user