diff --git a/Makefile b/Makefile index 8626abfa3..0f8359a01 100644 --- a/Makefile +++ b/Makefile @@ -26,7 +26,8 @@ ROOT := github.com/caicloud/cyclone # Target binaries. You can build multiple binaries for a single project. TARGETS := server workflow/controller workflow/coordinator cicd/cd toolbox/fstream -IMAGES := server workflow/controller workflow/coordinator resolver/git resolver/svn resolver/image watcher cicd/cd cicd/sonarqube toolbox web +IMAGES := server workflow/controller workflow/coordinator resolver/git resolver/svn resolver/image watcher cicd/cd cicd/sonarqube toolbox +BASE_IMAGES := base/alpine base/openjdk # Container image prefix and suffix added to targets. # The final built images are: @@ -35,13 +36,18 @@ IMAGES := server workflow/controller workflow/coordinator resolver/git resolver/ IMAGE_PREFIX ?= $(strip cyclone-) IMAGE_SUFFIX ?= $(strip ) -# REGISTRY ?= docker.io/library # Container registry for target images. -REGISTRY ?= docker.io/library +REGISTRY ?= docker.io/caicloud -# Container registry for base images. +# Container registry for images used to complile, like building golang binaries and building webs, e.g. docker.io/library/golang. BASE_REGISTRY ?= docker.io/library +# Container registry for cyclone target base images. +CYCLONE_BASE_REGISTRY ?= docker.io/caicloud + +# Version of the cyclone base images. +CYCLONE_BASE_VERSION ?= v1.0.0 + # Example scene SCENE ?= cicd @@ -52,6 +58,7 @@ ARCH ?= amd64 ifeq ($(ARCH),arm64) DOCKERFILE ?= Dockerfile.arm64 REGISTRY ?= cargo.dev.caicloud.xyz/arm64v8 +CYCLONE_BASE_VERSION := $(CYCLONE_BASE_VERSION)-arm64v8 else DOCKERFILE ?= Dockerfile REGISTRY ?= cargo.dev.caicloud.xyz/release @@ -184,6 +191,13 @@ container-local: build-local -f $(BUILD_DIR)/$${image}/$(DOCKERFILE) .; \ done +container-base: + @for image in $(BASE_IMAGES); do \ + imageName=$(IMAGE_PREFIX)$${image/\//-}$(IMAGE_SUFFIX); \ + docker build -t ${CYCLONE_BASE_REGISTRY}/$${imageName}:${CYCLONE_BASE_VERSION} \ + -f $(BUILD_DIR)/$${image}/$(DOCKERFILE) .; \ + done + push: @for image in $(IMAGES); do \ imageName=$(IMAGE_PREFIX)$${image/\//-}$(IMAGE_SUFFIX); \ diff --git a/build/base/alpine/Dockerfile b/build/base/alpine/Dockerfile new file mode 100644 index 000000000..a86d13ad9 --- /dev/null +++ b/build/base/alpine/Dockerfile @@ -0,0 +1,15 @@ +FROM alpine:3.8 +LABEL maintainer="zhujian@caicloud.io" + +RUN apk update && \ + apk add --no-cache ca-certificates bash coreutils git subversion curl jq + +ENV DOCKER_VERSION 18.06.0 +RUN curl -O https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}-ce.tgz && \ + tar -xzf docker-${DOCKER_VERSION}-ce.tgz && \ + mv docker/docker /usr/local/bin/docker && \ + rm -rf ./docker docker-${DOCKER_VERSION}-ce.tgz + +RUN apk add tzdata && \ + ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ + echo "Asia/Shanghai" > /etc/timezone \ No newline at end of file diff --git a/build/base/alpine/Dockerfile.arm64 b/build/base/alpine/Dockerfile.arm64 new file mode 100644 index 000000000..93aa597b6 --- /dev/null +++ b/build/base/alpine/Dockerfile.arm64 @@ -0,0 +1,17 @@ +FROM arm64v8/alpine:3.8 +LABEL maintainer="zhujian@caicloud.io" + +RUN apk update && \ + apk add --no-cache ca-certificates bash coreutils git subversion curl jq + +ENV DOCKER_VERSION=18.06.0 +RUN curl -O https://download.docker.com/linux/static/stable/aarch64/docker-${DOCKER_VERSION}-ce.tgz && \ + tar -xzf docker-${DOCKER_VERSION}-ce.tgz && \ + mv docker/docker /usr/local/bin/docker && \ + rm -rf ./docker docker-${DOCKER_VERSION}-ce.tgz + +RUN apk add --no-cache tzdata && \ + ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ + echo "Asia/Shanghai" > /etc/timezone + + diff --git a/build/base/openjdk/Dockerfile b/build/base/openjdk/Dockerfile new file mode 100644 index 000000000..3ae5c2917 --- /dev/null +++ b/build/base/openjdk/Dockerfile @@ -0,0 +1,40 @@ +FROM library/openjdk:8-alpine3.8 + +RUN apk add --no-cache curl grep sed unzip bash nodejs nodejs-npm + +# Set timezone to CST +ENV TZ=America/Chicago +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /usr/src + +RUN curl --insecure -o ./sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.3.0.1492-linux.zip && \ + unzip sonarscanner.zip && \ + rm sonarscanner.zip && \ + mv sonar-scanner-3.3.0.1492-linux /usr/lib/sonar-scanner && \ + ln -s /usr/lib/sonar-scanner/bin/sonar-scanner /usr/local/bin/sonar-scanner + +ENV SONAR_RUNNER_HOME=/usr/lib/sonar-scanner + +COPY build/base/openjdk/sonar-runner.properties /usr/lib/sonar-scanner/conf/sonar-scanner.properties + +# ensure Sonar uses the provided Java for musl instead of a borked glibc one +RUN sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /usr/lib/sonar-scanner/bin/sonar-scanner + +# Separating ENTRYPOINT and CMD operations allows for core execution variables to +# be easily overridden by passing them in as part of the `docker run` command. +# This allows the default /usr/src base dir to be overridden by users as-needed. + +# ENTRYPOINT ["sonar-scanner"] +CMD ["-Dsonar.projectBaseDir=/usr/src"] + +# ==================== # +# Contents above copied from https://github.com/newtmitch/docker-sonar-scanner/blob/master/Dockerfile.sonarscanner-3.3.0-alpine +# ==================== # + +# FROM newtmitch/sonar-scanner:3.3.0-alpine + +LABEL maintainer="zhujian@caicloud.io" + +RUN apk update && \ + apk add --no-cache ca-certificates bash coreutils curl jq \ No newline at end of file diff --git a/build/base/openjdk/Dockerfile.arm64 b/build/base/openjdk/Dockerfile.arm64 new file mode 100644 index 000000000..3cc9ac789 --- /dev/null +++ b/build/base/openjdk/Dockerfile.arm64 @@ -0,0 +1,43 @@ +FROM arm64v8/openjdk:8-alpine3.8 + +RUN apk add --no-cache curl grep sed unzip bash nodejs nodejs-npm + +# Set timezone to CST +ENV TZ=America/Chicago +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /usr/src + +RUN curl --insecure -o ./sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.3.0.1492-linux.zip && \ + unzip sonarscanner.zip && \ + rm sonarscanner.zip && \ + mv sonar-scanner-3.3.0.1492-linux /usr/lib/sonar-scanner && \ + ln -s /usr/lib/sonar-scanner/bin/sonar-scanner /usr/local/bin/sonar-scanner + +ENV SONAR_RUNNER_HOME=/usr/lib/sonar-scanner + +COPY build/base/openjdk/sonar-runner.properties /usr/lib/sonar-scanner/conf/sonar-scanner.properties + +# ensure Sonar uses the provided Java for musl instead of a borked glibc one +RUN sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /usr/lib/sonar-scanner/bin/sonar-scanner + +# Separating ENTRYPOINT and CMD operations allows for core execution variables to +# be easily overridden by passing them in as part of the `docker run` command. +# This allows the default /usr/src base dir to be overridden by users as-needed. + +# ENTRYPOINT ["sonar-scanner"] +CMD ["-Dsonar.projectBaseDir=/usr/src"] + +# ==================== # +# Contents above copied from https://github.com/newtmitch/docker-sonar-scanner/blob/master/Dockerfile.sonarscanner-3.3.0-alpine, +# in order to build an arm64 supported image of newtmitch/sonar-scanner:3.3.0-alpine +# ==================== # + +# FROM newtmitch/sonar-scanner:3.3.0-alpine + +LABEL maintainer="zhujian@caicloud.io" + +RUN apk update && \ + apk add --no-cache ca-certificates bash coreutils curl jq + + diff --git a/build/cicd/sonarqube/sonar-runner.properties b/build/base/openjdk/sonar-runner.properties similarity index 100% rename from build/cicd/sonarqube/sonar-runner.properties rename to build/base/openjdk/sonar-runner.properties diff --git a/build/cicd/cd/Dockerfile b/build/cicd/cd/Dockerfile index 44b2ee0d7..816fe541b 100644 --- a/build/cicd/cd/Dockerfile +++ b/build/cicd/cd/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" diff --git a/build/cicd/cd/Dockerfile.arm64 b/build/cicd/cd/Dockerfile.arm64 index a212c1f3a..f0b09ff18 100644 --- a/build/cicd/cd/Dockerfile.arm64 +++ b/build/cicd/cd/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" diff --git a/build/cicd/sonarqube/Dockerfile b/build/cicd/sonarqube/Dockerfile index a1c5b0d79..807a672c9 100644 --- a/build/cicd/sonarqube/Dockerfile +++ b/build/cicd/sonarqube/Dockerfile @@ -1,13 +1,10 @@ -FROM newtmitch/sonar-scanner:3.3.0-alpine +FROM caicloud/cyclone-base-openjdk:v1.0.0 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace WORKDIR $WORKDIR -RUN wget -O /bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 && \ - chmod +x /bin/jq - COPY ./build/cicd/sonarqube/entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] diff --git a/build/cicd/sonarqube/Dockerfile.arm64 b/build/cicd/sonarqube/Dockerfile.arm64 index 24a44c69d..3c4d22d33 100644 --- a/build/cicd/sonarqube/Dockerfile.arm64 +++ b/build/cicd/sonarqube/Dockerfile.arm64 @@ -1,47 +1,10 @@ -FROM arm64v8/openjdk:8-alpine3.8 - -RUN apk add --no-cache curl grep sed unzip bash nodejs nodejs-npm - -# Set timezone to CST -ENV TZ=America/Chicago -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -WORKDIR /usr/src - -RUN curl --insecure -o ./sonarscanner.zip -L https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-3.3.0.1492-linux.zip && \ - unzip sonarscanner.zip && \ - rm sonarscanner.zip && \ - mv sonar-scanner-3.3.0.1492-linux /usr/lib/sonar-scanner && \ - ln -s /usr/lib/sonar-scanner/bin/sonar-scanner /usr/local/bin/sonar-scanner - -ENV SONAR_RUNNER_HOME=/usr/lib/sonar-scanner - -COPY build/cicd/sonarqube/sonar-runner.properties /usr/lib/sonar-scanner/conf/sonar-scanner.properties - -# ensure Sonar uses the provided Java for musl instead of a borked glibc one -RUN sed -i 's/use_embedded_jre=true/use_embedded_jre=false/g' /usr/lib/sonar-scanner/bin/sonar-scanner - -# Separating ENTRYPOINT and CMD operations allows for core execution variables to -# be easily overridden by passing them in as part of the `docker run` command. -# This allows the default /usr/src base dir to be overridden by users as-needed. - -# ENTRYPOINT ["sonar-scanner"] -CMD ["-Dsonar.projectBaseDir=/usr/src"] - -# ==================== # -# Contents above copied from https://github.com/newtmitch/docker-sonar-scanner/blob/master/Dockerfile.sonarscanner-3.3.0-alpine, -# in order to build an arm64 supported image of newtmitch/sonar-scanner:3.3.0-alpine -# ==================== # - -# FROM newtmitch/sonar-scanner:3.3.0-alpine +FROM caicloud/cyclone-base-openjdk:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace WORKDIR $WORKDIR -RUN apk add jq - COPY ./build/cicd/sonarqube/entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] diff --git a/build/resolver/git/Dockerfile b/build/resolver/git/Dockerfile index e9af1cda5..e55e774dd 100644 --- a/build/resolver/git/Dockerfile +++ b/build/resolver/git/Dockerfile @@ -1,13 +1,10 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace WORKDIR $WORKDIR -RUN apk update && \ - apk add --no-cache ca-certificates git bash coreutils - COPY ./build/resolver/git/entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] diff --git a/build/resolver/git/Dockerfile.arm64 b/build/resolver/git/Dockerfile.arm64 index 82dbb7877..c87eb7707 100644 --- a/build/resolver/git/Dockerfile.arm64 +++ b/build/resolver/git/Dockerfile.arm64 @@ -1,13 +1,10 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace WORKDIR $WORKDIR -RUN apk update && \ - apk add --no-cache ca-certificates git bash coreutils - COPY ./build/resolver/git/entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] diff --git a/build/resolver/image/Dockerfile b/build/resolver/image/Dockerfile index 8b38ac7b9..ac73f62ee 100644 --- a/build/resolver/image/Dockerfile +++ b/build/resolver/image/Dockerfile @@ -1,20 +1,10 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace -ENV DOCKER_VERSION 18.03.1-ce WORKDIR $WORKDIR -RUN apk add --no-cache curl && \ - set -x && \ - curl -L -o /tmp/docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz && \ - tar -xz -C /tmp -f /tmp/docker-${DOCKER_VERSION}.tgz && \ - mv /tmp/docker/docker /usr/bin && \ - rm -rf /tmp/docker && \ - rm /tmp/docker-${DOCKER_VERSION}.tgz - - COPY ./build/resolver/image/entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] diff --git a/build/resolver/image/Dockerfile.arm64 b/build/resolver/image/Dockerfile.arm64 index 452369101..2753a5d00 100644 --- a/build/resolver/image/Dockerfile.arm64 +++ b/build/resolver/image/Dockerfile.arm64 @@ -1,18 +1,11 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace -ENV DOCKER_VERSION 18.03.1-ce + WORKDIR $WORKDIR -RUN apk add --no-cache curl && \ - set -x && \ - curl -L -o /tmp/docker-${DOCKER_VERSION}.tgz https://download.docker.com/linux/static/stable/aarch64/docker-${DOCKER_VERSION}.tgz && \ - tar -xz -C /tmp -f /tmp/docker-${DOCKER_VERSION}.tgz && \ - mv /tmp/docker/docker /usr/bin && \ - rm -rf /tmp/docker && \ - rm /tmp/docker-${DOCKER_VERSION}.tgz COPY ./build/resolver/image/entrypoint.sh / diff --git a/build/resolver/svn/Dockerfile b/build/resolver/svn/Dockerfile index ee4914892..f366aece7 100644 --- a/build/resolver/svn/Dockerfile +++ b/build/resolver/svn/Dockerfile @@ -1,13 +1,10 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace WORKDIR $WORKDIR -RUN apk update && \ - apk add --no-cache ca-certificates bash coreutils subversion - COPY ./build/resolver/svn/entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] diff --git a/build/resolver/svn/Dockerfile.arm64 b/build/resolver/svn/Dockerfile.arm64 index ea86033f7..e2fa0ea9f 100644 --- a/build/resolver/svn/Dockerfile.arm64 +++ b/build/resolver/svn/Dockerfile.arm64 @@ -1,13 +1,10 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" ENV WORKDIR /workspace WORKDIR $WORKDIR -RUN apk update && \ - apk add --no-cache ca-certificates bash coreutils subversion - COPY ./build/resolver/svn/entrypoint.sh / ENTRYPOINT ["/entrypoint.sh"] diff --git a/build/server/Dockerfile b/build/server/Dockerfile index 775f6e7a3..28f0307ab 100644 --- a/build/server/Dockerfile +++ b/build/server/Dockerfile @@ -1,15 +1,9 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" WORKDIR /root -RUN apk update && apk add ca-certificates && \ - apk add --no-cache subversion && \ - apk add tzdata && \ - ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ - echo "Asia/Shanghai" > /etc/timezone - # Copy cyclone server and stage templates COPY bin/server /cyclone-server COPY manifests/templates /root/templates diff --git a/build/server/Dockerfile.arm64 b/build/server/Dockerfile.arm64 index 21fce68bf..2db5e5c0e 100644 --- a/build/server/Dockerfile.arm64 +++ b/build/server/Dockerfile.arm64 @@ -1,15 +1,9 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" WORKDIR /root -RUN apk update && apk add ca-certificates && \ - apk add --no-cache subversion && \ - apk add tzdata && \ - ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \ - echo "Asia/Shanghai" > /etc/timezone - # Copy cyclone server and stage templates COPY bin/server /cyclone-server COPY manifests/templates /root/templates diff --git a/build/toolbox/Dockerfile b/build/toolbox/Dockerfile index d5951556f..85c07822b 100644 --- a/build/toolbox/Dockerfile +++ b/build/toolbox/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" diff --git a/build/toolbox/Dockerfile.arm64 b/build/toolbox/Dockerfile.arm64 index ceffe1401..a273b43c9 100644 --- a/build/toolbox/Dockerfile.arm64 +++ b/build/toolbox/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" diff --git a/build/watcher/Dockerfile b/build/watcher/Dockerfile index 81698ea29..808cf7fbf 100644 --- a/build/watcher/Dockerfile +++ b/build/watcher/Dockerfile @@ -1,12 +1,9 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" WORKDIR /workspace -RUN apk update && \ - apk add --no-cache ca-certificates bash - COPY ./build/watcher/pvc-watcher.sh /workspace/pvc-watcher.sh CMD ["/workspace/pvc-watcher.sh"] \ No newline at end of file diff --git a/build/watcher/Dockerfile.arm64 b/build/watcher/Dockerfile.arm64 index 328294c46..e70a94391 100644 --- a/build/watcher/Dockerfile.arm64 +++ b/build/watcher/Dockerfile.arm64 @@ -1,12 +1,9 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" WORKDIR /workspace -RUN apk update && \ - apk add --no-cache ca-certificates bash - COPY ./build/watcher/pvc-watcher.sh /workspace/pvc-watcher.sh CMD ["/workspace/pvc-watcher.sh"] \ No newline at end of file diff --git a/build/workflow/controller/Dockerfile b/build/workflow/controller/Dockerfile index c09ec8d32..65dd1c798 100644 --- a/build/workflow/controller/Dockerfile +++ b/build/workflow/controller/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" diff --git a/build/workflow/controller/Dockerfile.arm64 b/build/workflow/controller/Dockerfile.arm64 index 254d45843..80f63a662 100644 --- a/build/workflow/controller/Dockerfile.arm64 +++ b/build/workflow/controller/Dockerfile.arm64 @@ -1,4 +1,4 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" diff --git a/build/workflow/coordinator/Dockerfile b/build/workflow/coordinator/Dockerfile index 733493d61..14c883ecb 100644 --- a/build/workflow/coordinator/Dockerfile +++ b/build/workflow/coordinator/Dockerfile @@ -1,22 +1,13 @@ -FROM alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0 LABEL maintainer="zhujian@caicloud.io" WORKDIR /workspace -RUN apk update && apk add ca-certificates &&\ - apk add curl # curl https://storage.googleapis.com/kubernetes-release/release/v1.12.2/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \ # chmod +x /usr/local/bin/kubectl && \ # kubectl version --client -ENV DOCKER_VERSION=18.06.0 -RUN curl -O https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}-ce.tgz && \ - tar -xzf docker-${DOCKER_VERSION}-ce.tgz && \ - mv docker/docker /usr/local/bin/docker && \ - rm -rf ./docker docker-${DOCKER_VERSION}-ce.tgz - - COPY ./bin/workflow/coordinator /workspace/coordinator CMD ["./coordinator"] \ No newline at end of file diff --git a/build/workflow/coordinator/Dockerfile.arm64 b/build/workflow/coordinator/Dockerfile.arm64 index 66dec490d..f1172bf3f 100644 --- a/build/workflow/coordinator/Dockerfile.arm64 +++ b/build/workflow/coordinator/Dockerfile.arm64 @@ -1,22 +1,13 @@ -FROM arm64v8/alpine:3.8 +FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 LABEL maintainer="zhujian@caicloud.io" WORKDIR /workspace -RUN apk update && apk add ca-certificates &&\ - apk add curl # curl https://storage.googleapis.com/kubernetes-release/release/v1.12.2/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl && \ # chmod +x /usr/local/bin/kubectl && \ # kubectl version --client -ENV DOCKER_VERSION=18.06.0 -RUN curl -O https://download.docker.com/linux/static/stable/aarch64/docker-${DOCKER_VERSION}-ce.tgz && \ - tar -xzf docker-${DOCKER_VERSION}-ce.tgz && \ - mv docker/docker /usr/local/bin/docker && \ - rm -rf ./docker docker-${DOCKER_VERSION}-ce.tgz - - COPY ./bin/workflow/coordinator /workspace/coordinator CMD ["./coordinator"] \ No newline at end of file