diff --git a/.github/workflows/publish-dragonos-docker-image.yml b/.github/workflows/publish-dragonos-docker-image.yml index b20ae61af..ebd2e2b68 100644 --- a/.github/workflows/publish-dragonos-docker-image.yml +++ b/.github/workflows/publish-dragonos-docker-image.yml @@ -5,6 +5,8 @@ on: push: paths: - tools/BUILD_CONTAINER_VERSION + branches: + - master jobs: docker: @@ -30,8 +32,8 @@ jobs: - name: Build and push docker image uses: docker/build-push-action@v4 with: - context: . - file: ./tools/Dockerfile + context: "{{defaultContext}}:tools" + file: Dockerfile platforms: linux/amd64 push: true tags: dragonos/dragonos-dev:${{ steps.fetch-versions.outputs.build_container_version }} diff --git a/tools/Dockerfile b/tools/Dockerfile index c6d644c96..b819563c5 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -2,6 +2,8 @@ FROM ubuntu:jammy # 设置环境变量 ENV TZ=Asia/Shanghai +ENV RUSTUP_DIST_SERVER=https://static.rust-lang.org +ENV RUSTUP_UPDATE_ROOT=https://static.rust-lang.org/rustup RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # 设置工作目录