Skip to content

Commit

Permalink
chore: update erda base image (erda-project#5282)
Browse files Browse the repository at this point in the history
* adjust erda-base image and install docker-ce-cli

* use new base image
  • Loading branch information
sfwn authored Jul 26, 2022
1 parent 2d483b0 commit ea56103
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .erda/pipelines/ci-build-ce.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ stages:
- stage:
- custom-script:
alias: build-erda
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
commands:
- cd ${{ dirs.erda }}
- mkdir -p extensions
Expand Down
10 changes: 5 additions & 5 deletions .erda/pipelines/ci-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ stages:
- stage:
- custom-script:
alias: build-erda
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
commands:
- cd ${{ dirs.erda }}
- mkdir -p extensions
Expand All @@ -83,7 +83,7 @@ stages:
mem: 2048
- custom-script:
alias: build-erda-cli
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
commands:
- cd ${{ dirs.erda }}
- export ERDA_VERSION=${{ outputs.extract-repo-version.major_minor_version }}
Expand All @@ -101,7 +101,7 @@ stages:
mem: 2048
- custom-script:
alias: build-agent
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
commands:
- cd ${{ dirs.erda }}
- export ERDA_VERSION=${{ outputs.extract-repo-version.major_minor_version }}
Expand Down Expand Up @@ -138,7 +138,7 @@ stages:
mem: 1024
- custom-script:
alias: build-erda-cli-linux
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
description: 运行自定义命令
commands:
- workDir=$(pwd)
Expand All @@ -156,7 +156,7 @@ stages:
mem: 2048
- custom-script:
alias: build-erda-cli-mac
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
description: 运行自定义命令
commands:
- workDir=$(pwd)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
CI:
runs-on: ubuntu-latest
container:
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
needs:
- PREPARE
steps:
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
CODE-CHECK:
runs-on: ubuntu-latest
container:
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
needs:
- PREPARE
steps:
Expand Down Expand Up @@ -140,7 +140,7 @@ jobs:
CODE-TEST:
runs-on: ubuntu-latest
container:
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
needs:
- PREPARE
strategy:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ run-test:
go run tools/gotools/go-test-sum/main.go

full-test:
docker run --rm -ti -v $$(pwd):/go/src/output registry.erda.cloud/erda/erda-base:20220713 \
docker run --rm -ti -v $$(pwd):/go/src/output registry.erda.cloud/erda/erda-base:20220726 \
bash -c 'cd /go/src/output && build/scripts/test_in_container.sh'

# docker image
Expand Down
38 changes: 28 additions & 10 deletions build/dockerfiles/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,36 @@ FROM --platform=$TARGETPLATFORM golang:1.17-bullseye
# set timezone to CST
RUN cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

RUN echo "deb http://deb.debian.org/debian bookworm main" >> /etc/apt/sources.list # for libgit2-1.3
RUN curl -sL https://deb.nodesource.com/setup_current.x | bash - && apt install -y nodejs
RUN apt update && \
apt install -y --no-install-recommends --no-install-suggests \
# libgit2-1.3
RUN echo "deb http://deb.debian.org/debian bookworm main" >> /etc/apt/sources.list
RUN apt update && apt install -y --no-install-recommends --no-install-suggests \
cmake \
gcc \
g++ \
ca-certificates \
curl \
gnupg \
lsb-release \
libssl-dev \
vim \
jq \
python3-pip \
# for libgit2
cmake libssl-dev libgit2-1.3 libgit2-dev \
jq python3-pip \
nodejs \
vim && \
rm -fr /var/cache/apk
libgit2-1.3 libgit2-dev \
&& rm -fr /var/lib/apt/lists/*

RUN apt install -y libgit2-1.3
# nodejs
RUN curl -sL https://deb.nodesource.com/setup_current.x | bash - && apt install -y nodejs && rm -fr /var/lib/apt/lists/*

# docker-cli
RUN mkdir -p /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg \
&& echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null \
&& apt update && apt install -y --no-install-recommends --no-install-suggests \
docker-ce-cli \
&& rm -fr /var/lib/apt/lists/*

# librdkafka
# doc: https://github.com/confluentinc/confluent-kafka-go#librdkafka
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/base_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o errexit -o pipefail
cd "$(dirname "$0")/../dockerfiles/base";

# setup base image
DOCKER_IMAGE=golang-base:20220713
DOCKER_IMAGE=golang-base:20220726

if [ -n "${DOCKER_REGISTRY}" ]; then
DOCKER_IMAGE=${DOCKER_REGISTRY}/${DOCKER_IMAGE}
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ cd $(git rev-parse --show-toplevel)
VERSION="$(build/scripts/make-version.sh)"
IMAGE_TAG="${IMAGE_TAG:-$(build/scripts/make-version.sh tag)}"
DOCKERFILE_DEFAULT="build/dockerfiles/Dockerfile"
BASE_DOCKER_IMAGE="registry.erda.cloud/erda/erda-base:20220713"
BASE_DOCKER_IMAGE="registry.erda.cloud/erda/erda-base:20220726"
DOCKERFILE=${DOCKERFILE_DEFAULT}

# setup single module envionment variables
Expand Down
8 changes: 4 additions & 4 deletions pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ stages:
- stage:
- custom-script:
alias: build-erda
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
commands:
- cd ${{ dirs.erda }}
- mkdir -p extensions
Expand All @@ -85,7 +85,7 @@ stages:
mem: 2048
- custom-script:
alias: build-erda-cli
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
commands:
- cd ${{ dirs.erda }}
- export ERDA_VERSION=${{ outputs.extract-repo-version.major_minor_version }}
Expand Down Expand Up @@ -139,7 +139,7 @@ stages:
mem: 1024
- custom-script:
alias: build-erda-cli-linux
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
description: 运行自定义命令
commands:
- workDir=$(pwd)
Expand All @@ -157,7 +157,7 @@ stages:
mem: 2048
- custom-script:
alias: build-erda-cli-mac
image: registry.erda.cloud/erda/erda-base:20220713
image: registry.erda.cloud/erda/erda-base:20220726
description: 运行自定义命令
commands:
- workDir=$(pwd)
Expand Down

0 comments on commit ea56103

Please sign in to comment.