jepsen-io / jepsen

A framework for distributed systems verification, with fault injection
6.78k stars 714 forks source link

Docker doesn't work out of the box with M1 Macs #588

Closed jackyzha0 closed 6 months ago

jackyzha0 commented 6 months ago

I know that Docker compose is now deprecated but I found a workaround that builds a custom base image that allows it to work on arm64, let me know if this would be a useful contribution!

FROM jgoerzen/debian-base-minimal:bookworm as debian-addons
FROM debian:bookworm-slim

ENV container=docker
STOPSIGNAL SIGRTMIN+3

COPY --from=debian-addons /usr/local/preinit/ /usr/local/preinit/
COPY --from=debian-addons /usr/local/bin/ /usr/local/bin/
COPY --from=debian-addons /usr/local/debian-base-setup/ /usr/local/debian-base-setup/

RUN run-parts --exit-on-error --verbose /usr/local/debian-base-setup

...

CMD ["/usr/local/bin/boot-debian-base"]
aphyr commented 6 months ago

I can merge a PR this if you like, but ideally it shouldn't break other platforms too--that's been a common problem in previous Docker PRs. You can also put together your own repo if you'd like to maintain it--then I can link to that from the README. :-)

jackyzha0 commented 6 months ago

should be safe! i'm just following https://salsa.debian.org/jgoerzen/docker-debian-base-standard/-/tree/master?ref_type=heads#advanced-topic-adding-these-enhancements-to-other-images as jgoerzen's base images don't work out of the box with arm64

i'll PR this and you can make the final call on whether to merge or not :)