Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buildx images are not cleaned-up on self-hosted runner #151

Closed
milandufek opened this issue Oct 30, 2023 · 1 comment · Fixed by #152
Closed

Buildx images are not cleaned-up on self-hosted runner #151

milandufek opened this issue Oct 30, 2023 · 1 comment · Fixed by #152

Comments

@milandufek
Copy link

Hello, since using this action in version v8.0.0, the buildx images are not stopped (and removed) on our self-hosted GHA runners.

It seems there is missing some cleanup job.

docker ps from our self-hosted runner

CONTAINER ID   IMAGE                           COMMAND       CREATED       STATUS       PORTS     NAMES
9353f5771f4a   moby/buildkit:buildx-stable-1   "buildkitd"   2 hours ago   Up 2 hours             buildx_buildkit_pensive_chandrasekhar0
4d144ca380c2   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_awesome_kowalevski0
1a74e878ce46   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_laughing_neumann0
54c32648f6e3   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_elastic_hugle0
d3afaff30e42   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_hungry_almeida0
fd5825500f48   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_sad_zhukovsky0
c94e7c3f7293   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_brave_varahamihira0
a00dc7bb2963   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_happy_beaver0
db16879066aa   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_zen_cannon0
9bb0e420d588   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_gracious_williamson0
6959d307e54a   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_amazing_shockley0
8776f3172b32   moby/buildkit:buildx-stable-1   "buildkitd"   2 days ago    Up 2 days              buildx_buildkit_adoring_shirley0
e4fbe893e12b   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_jovial_snyder0
370f6a16f3bf   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_crazy_franklin0
c479656021b4   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_sad_morse0
5f39dc83113f   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_pedantic_chandrasekhar0
bfc2aeb2fb75   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_sweet_euler0
6f1a994e8557   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_beautiful_elgamal0
d040c78e23dc   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_serene_volhard0
d175d1a33488   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_heuristic_khayyam0
630106ae5d1d   moby/buildkit:buildx-stable-1   "buildkitd"   3 days ago    Up 3 days              buildx_buildkit_vibrant_shaw0
e93ec538d917   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_elegant_torvalds0
ea765247d0bb   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_sad_lumiere0
11a0004fb264   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_sleepy_ptolemy0
18e8d040b59d   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_objective_meitner0
02b8957760cd   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_wizardly_greider0
3002339f5729   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_zen_carson0
1bbd634ced20   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_stupefied_lovelace0
7b7e1d2873a9   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_competent_lamarr0
686bf45a066b   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_admiring_austin0
8b425a03bb72   moby/buildkit:buildx-stable-1   "buildkitd"   4 days ago    Up 4 days              buildx_buildkit_brave_keldysh0
7e32d28386e9   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_relaxed_blackwell0
cc608e0a2efd   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_boring_mccarthy0
aa7fc20c08f6   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_practical_bell0
4da23756b69a   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_adoring_euclid0
2f7d30ffa482   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_dreamy_mcnulty0
bfc32c065c44   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_dazzling_austin0
2643b185907c   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_funny_herschel0
abc915b88f94   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_funny_panini0
aac775bc1eb3   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_amazing_lalande0
b2dfeaf55525   moby/buildkit:buildx-stable-1   "buildkitd"   5 days ago    Up 5 days              buildx_buildkit_lucid_ritchie0

Docker info

Client: Docker Engine - Community
 Version:    24.0.5
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.11.2
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.20.2
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 2
  Running: 2
  Paused: 0
  Stopped: 0
 Images: 1
 Server Version: 24.0.5
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 3dce8eb055cbb6872793272b4f20ed16117344f8
 runc version: v1.1.7-0-g860f061
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.10.0-23-amd64
 Operating System: Debian GNU/Linux 11 (bullseye)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.759GiB
 Name: vps-349-mergado-gha-runner-2
 ID: cb07fba4-d4b1-40a2-9a29-d953742ea685
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Action usage

- name: "xxx image build"
  uses: whoan/[email protected]
  with:
    image_name: xxx
    image_tag: app,app-${{ env.VERSION }},latest
    dockerfile: docker/Dockerfile.xxx
    registry: ${{ env.REGISTRY }}
    username: ${{ secrets.REGISTRY_USERNAME }}
    password: ${{ secrets.REGISTRY_PASSWORD }}
    pull_image_and_stages: true
    push_image_and_stages: true
    build_extra_args: |
      --tag=xxx:app
      --tag=xxx:app-${{ env.VERSION }}
      --label="com.xxx.env=app"
      --target=xxx.production
@whoan
Copy link
Owner

whoan commented Oct 30, 2023

I will definitely take a look later today. Thanks for the datailed report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants