-
Notifications
You must be signed in to change notification settings - Fork 168
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: provide cyclone base images to build images (#1407)
- Loading branch information
Showing
26 changed files
with
154 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM alpine:3.8 | ||
LABEL maintainer="[email protected]" | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
FROM arm64v8/alpine:3.8 | ||
LABEL maintainer="[email protected]" | ||
|
||
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 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="[email protected]" | ||
|
||
RUN apk update && \ | ||
apk add --no-cache ca-certificates bash coreutils curl jq |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="[email protected]" | ||
|
||
RUN apk update && \ | ||
apk add --no-cache ca-certificates bash coreutils curl jq | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM arm64v8/alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
FROM newtmitch/sonar-scanner:3.3.0-alpine | ||
FROM caicloud/cyclone-base-openjdk:v1.0.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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="[email protected]" | ||
|
||
ENV WORKDIR /workspace | ||
WORKDIR $WORKDIR | ||
|
||
RUN apk add jq | ||
|
||
COPY ./build/cicd/sonarqube/entrypoint.sh / | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
FROM alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
FROM arm64v8/alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,10 @@ | ||
FROM alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,11 @@ | ||
FROM arm64v8/alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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 / | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
FROM alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,10 @@ | ||
FROM arm64v8/alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
FROM arm64v8/alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
FROM arm64v8/alpine:3.8 | ||
FROM caicloud/cyclone-base-alpine:v1.0.0-arm64v8 | ||
|
||
LABEL maintainer="[email protected]" | ||
|
||
|
Oops, something went wrong.