Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Image

on:
push:
branches:
- main

jobs:
changes:
runs-on: ubuntu-latest
outputs:
docker: ${{ steps.filter.outputs.docker }}
steps:
- uses: actions/checkout@v4

- name: Check for Dockerfile changes
id: filter
uses: dorny/paths-filter@v3
with:
filters: |
docker:
- 'Dockerfile'
build:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.docker != '' }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU (enable cross-arch)
uses: docker/setup-qemu-action@v3

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

- name: Log in to Quay
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile
push: true
platforms: linux/amd64,linux/arm64
tags: |
quay.io/akuity/stress-ng:latest
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM debian:bullseye AS builder

RUN apt-get update && apt-get install -yq make gcc busybox-static

WORKDIR /code
ENV STRESS_VER=0.09.41
ADD https://github.com/ColinIanKing/stress-ng/archive/V${STRESS_VER}.tar.gz .
RUN tar -xf V${STRESS_VER}.tar.gz && mv stress-ng-${STRESS_VER} stress-ng

# make static version
WORKDIR /code/stress-ng
RUN STATIC=1 make

# Final image
FROM scratch

# copy stress-ng
COPY --from=builder /code/stress-ng/stress-ng /

# copy static sleep
COPY --from=builder /bin/busybox /bin/sleep

ENTRYPOINT ["/stress-ng"]
4 changes: 1 addition & 3 deletions oom-demo/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ spec:
- 150M
- '--vm-hang'
- '1'
command:
- stress
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was not removed in #11, that why it broke the demo.

@qiuming-best has already tested and this should be working

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried the demo app on M1 laptop and did not get OOM for some reason. It probably working on other types of laptops but I know we do a lot of demos on M1 laptops, so want to experiment more.

Copy link

@qiuming-best qiuming-best Oct 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexmt It's quite strange, my laptop is M4, but it can get OOM with the image quay.io/akuity/stress-ng

Image Image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect this is because I use orbstack. Somehow on Orbstack memory limit works for non arm images but does not work for arm:

image

image: polinux/stress
image: quay.io/akuity/stress-ng
imagePullPolicy: IfNotPresent
name: oom
startupProbe:
Expand Down