Commit 161f4cd6 authored by Chen Kaiwei's avatar Chen Kaiwei

Merge branch 'master' into 'master'

include builder images

See merge request !17
parents 1164d8d3 311f1ed4
Pipeline #11986 passed with stage
in 14 seconds
stages:
- build
variables:
DOCKER_HOST: tcp://localhost:2375
DOCKER_REG: $CI_REGISTRY_IMAGE
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
build atom-deep-learning:
stage: build
tags:
......@@ -19,10 +26,67 @@ build atom-deep-learning:
paths:
- /var/lib/docker
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- export DOCKER_HOST=tcp://localhost:2375
- export DOCKER_REG=$CI_REGISTRY_IMAGE/deep-learning
- echo "building image as user $CI_REGISTRY_USER at registry $CI_REGISTRY to repo $DOCKER_REG ..."
- cd deep-learning
- ./build.sh
build golang-builder:
stage: build
tags:
- dind
only:
refs:
- merge_requests
image: reg.supremind.info/hub/atom/builder/docker-runner:latest
services:
- docker:18.09.7-dind
variables: &dindVars
DOCKER_DRIVER: overlay2
cache:
policy: pull-push
key: dind-go
paths:
- /var/lib/docker
script:
- make push-golang-builder
build docker-runner:
stage: build
tags:
- dind
only:
refs:
- merge_requests
image: reg.supremind.info/hub/atom/builder/docker-runner:latest
services:
- docker:18.09.7-dind
variables: &dindVars
DOCKER_DRIVER: overlay2
cache:
policy: pull-push
key: dind-go
paths:
- /var/lib/docker
script:
- make push-docker-runner
build alpine-base:
stage: build
tags:
- dind
only:
refs:
- merge_requests
image: reg.supremind.info/hub/atom/builder/docker-runner:latest
services:
- docker:18.09.7-dind
variables: &dindVars
DOCKER_DRIVER: overlay2
cache:
policy: pull-push
key: dind-go
paths:
- /var/lib/docker
script:
- make push-alpine-base
VERSION ?= $(shell date -u '+%Y%m%d')-$(shell git describe --tags --always --dirty)
DOCKER_REG ?= reg.supremind.info/hub/atom
BUILDERS = $(shell ls builder)
PUSH_BUILDERS = $(patsubst %,push-%, $(BUILDERS))
$(BUILDERS): %: builder/%
docker build -t $@ $<
$(PUSH_BUILDERS): push-%: %
docker tag $< $(DOCKER_REG)/builder/$<:$(VERSION)
docker push $(DOCKER_REG)/builder/$<:$(VERSION)
docker tag $< $(DOCKER_REG)/builder/$<:latest
docker push $(DOCKER_REG)/builder/$<:latest
builders: $(BUILDERS)
push-builders: $(PUSH_BUILDERS)
all: push-builders
.PHONY: builders $(BUILDERS) push-builders $(PUSH_BUILDERS)
FROM dockerhub.azk8s.cn/library/alpine:3.9
LABEL MAINTAINER="atom@supremind.com"
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache ca-certificates openssh-client bash curl mailcap git
FROM dockerhub.azk8s.cn/library/docker:18
LABEL MAINTAINER="atom@supremind.com"
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add --no-cache git bash make gomplate openssh-client
FROM dockerhub.azk8s.cn/library/golang:1.14-alpine
LABEL MAINTAINER="atom@supremind.com"
ENV GOPROXY=https://goproxy.cn,direct
ENV GOPRIVATE=git.supremind.info
ENV GO111MODULE=on
ENV GOSUMDB=off
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/main' >> /etc/apk/repositories
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.6/community' >> /etc/apk/repositories
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk update && \
apk add --no-cache git build-base ca-certificates bash curl openssh-client mongodb=3.4.4-r0
RUN wget -O /tmp/qshell.zip http://devtools.qiniu.com/qshell-v2.3.6.zip && \
unzip /tmp/qshell.zip -d /tmp && \
chmod +x /tmp/qshell_linux_x64 && \
mv /tmp/qshell_linux_x64 /usr/bin/qshell
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment