Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tech-shrimp committed Jun 13, 2024
1 parent e352a17 commit 119118f
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
46 changes: 43 additions & 3 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,41 @@ jobs:
name: Pull
runs-on: ubuntu-latest
steps:
- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Before freeing up disk space
run: |
echo "Before freeing up disk space"
echo "=============================================================================="
df -hT
echo "=============================================================================="
# 增加可用磁盘空间
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:

root-reserve-mb: 2048
swap-size-mb: 128
remove-dotnet: 'true'
remove-haskell: 'true'
remove-android: 'true'
build-mount-path: '/var/lib/docker/'

- name: Restart docker
run: sudo service docker restart

- name: Free up disk space complete
run: |
echo "Free up disk space complete"
echo "=============================================================================="
df -hT
echo "=============================================================================="
- name: Checkout Code
uses: actions/checkout@v4

- name: Docker Setup Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push image Aliyun
run: |
docker login -u $ALIYUN_REGISTRY_USER -p $ALIYUN_REGISTRY_PASSWORD $ALIYUN_REGISTRY
Expand Down Expand Up @@ -112,4 +141,15 @@ jobs:
docker tag $image $new_image
echo "docker push $new_image"
docker push $new_image
done < images.txt
echo "开始清理磁盘空间"
echo "=============================================================================="
df -hT
echo "=============================================================================="
docker rmi $image
docker rmi $new_image
echo "磁盘空间清理完毕"
echo "=============================================================================="
df -hT
echo "=============================================================================="
done < images.txt
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Docker Images Pusher

使用Github Action将国外的Docker镜像转存到阿里云私有仓库,供国内服务器使用,免费易用<br>
支持DockerHub, gcr.io, k8s.io, quay.io, ghcr.io等任意仓库
支持DockerHub, gcr.io, k8s.io, ghcr.io等任意仓库<br>
支持最大50GB左右的大型镜像<br>

视频教程:https://www.bilibili.com/video/BV1Zn4y19743/

Expand Down

0 comments on commit 119118f

Please sign in to comment.