jepsen-io / maelstrom

A workbench for writing toy implementations of distributed systems.
Eclipse Public License 1.0
3.05k stars 189 forks source link

Add basic Dockerfile #83

Open Nezteb opened 1 year ago

Nezteb commented 1 year ago

I want to be able to run maelstrom without installing a JVM/Clojure/Leiningen, so I figured I'd create a simple Dockerfile for it. 😄

@aphyr I added some commented-out documentation in the README. I figured it can stay commented out until the Jepsen/maelstrom team decides on how to publish an official image on Docker Hub? 😅

Nezteb commented 1 year ago

This doesn't currently work but I'm not sure why:

❯ docker run maelstrom:latest analyze
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix.impl.mathsops, being replaced by: #'clojure.core.matrix.impl.mathsops/abs
Warning: protocol #'clojure.core.matrix.protocols/PMathsFunctions is overwriting function abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix.protocols, being replaced by: #'clojure.core.matrix.protocols/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix, being replaced by: #'clojure.core.matrix/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix.dataset, being replaced by: #'clojure.core.matrix/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: incanter.core, being replaced by: #'incanter.core/abs
ERROR [2023-11-01 00:10:17,701] main - jepsen.cli Oh jeez, I'm sorry, Jepsen broke. Here's why:
java.lang.IndexOutOfBoundsException: null
        at clojure.lang.RT.nthFrom(RT.java:928)
        at clojure.lang.RT.nth(RT.java:897)
        at jepsen.store$test.invokeStatic(store.clj:281)
        at jepsen.store$test.invoke(store.clj:264)
        at jepsen.cli$single_test_cmd$fn__13969.invoke(cli.clj:412)
        at jepsen.cli$run_BANG_.invokeStatic(cli.clj:329)
        at jepsen.cli$run_BANG_.invoke(cli.clj:258)
        at maelstrom.core$_main.invokeStatic(core.clj:269)
        at maelstrom.core$_main.doInvoke(core.clj:267)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at maelstrom.core.main(Unknown Source)
aphyr commented 1 year ago

Thanks for offering this Nezteb. Why don't you maintain this yourself, and we can add a link to it in the Maelstrom README? My experience with the Jepsen Dockerfile has been a real headache of cross-version and cross-platform compatibility bugs, and since I don't actually use Docker, or have access to a Mac, I'm not well-positioned to respond to support requests for it.