File tree Expand file tree Collapse file tree 3 files changed +74
-3
lines changed Expand file tree Collapse file tree 3 files changed +74
-3
lines changed Original file line number Diff line number Diff line change 1+ name : Image
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+
8+ jobs :
9+ changes :
10+ runs-on : ubuntu-latest
11+ outputs :
12+ docker : ${{ steps.filter.outputs.docker }}
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - name : Check for Dockerfile changes
17+ id : filter
18+ uses : dorny/paths-filter@v3
19+ with :
20+ filters : |
21+ docker:
22+ - 'Dockerfile'
23+ build :
24+ runs-on : ubuntu-latest
25+ needs : changes
26+ if : ${{ needs.changes.outputs.docker != '' }}
27+ steps :
28+ - name : Checkout
29+ uses : actions/checkout@v2
30+ - name : Set up QEMU (enable cross-arch)
31+ uses : docker/setup-qemu-action@v3
32+
33+ - name : Set up Docker Buildx
34+ uses : docker/setup-buildx-action@v3
35+
36+ - name : Log in to Quay
37+ uses : docker/login-action@v3
38+ with :
39+ registry : quay.io
40+ username : ${{ secrets.QUAY_USERNAME }}
41+ password : ${{ secrets.QUAY_PASSWORD }}
42+ - name : Build and push
43+ uses : docker/build-push-action@v5
44+ with :
45+ context : .
46+ file : Dockerfile
47+ push : true
48+ platforms : linux/amd64,linux/arm64
49+ tags : |
50+ quay.io/akuity/stress-ng:latest
Original file line number Diff line number Diff line change 1+ FROM debian:bullseye AS builder
2+
3+ RUN apt-get update && apt-get install -yq make gcc busybox-static
4+
5+ WORKDIR /code
6+ ENV STRESS_VER=0.09.41
7+ ADD https://github.com/ColinIanKing/stress-ng/archive/V${STRESS_VER}.tar.gz .
8+ RUN tar -xf V${STRESS_VER}.tar.gz && mv stress-ng-${STRESS_VER} stress-ng
9+
10+ # make static version
11+ WORKDIR /code/stress-ng
12+ RUN STATIC=1 make
13+
14+ # Final image
15+ FROM scratch
16+
17+ # copy stress-ng
18+ COPY --from=builder /code/stress-ng/stress-ng /
19+
20+ # copy static sleep
21+ COPY --from=builder /bin/busybox /bin/sleep
22+
23+ ENTRYPOINT ["/stress-ng" ]
Original file line number Diff line number Diff line change 2323 - 150M
2424 - ' --vm-hang'
2525 - ' 1'
26- command :
27- - stress
28- image : polinux/stress
26+ image : quay.io/akuity/stress-ng
2927 imagePullPolicy : IfNotPresent
3028 name : oom
3129 startupProbe :
You can’t perform that action at this time.
0 commit comments