hachem.wtf
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-09-05 18:25:24 +0200
committerhachem <im@hachem.wtf>2026-09-05 18:25:24 +0200
commit9c9e26a5cab8f12f949be3ab6fea824f3d64a6ee (patch)
tree51e4a4a51a6a6e0abcbda666f5f4ca620ba44c7c
parentf898af72e9a83cc92d92eb0a4b6fe9f58c19aa76 (diff)
fix: coupy sources and pin linux/amd64
-rw-r--r--Dockerfile4
-rw-r--r--README.md21
2 files changed, 20 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index 6001385..c45aa6c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:bookworm-slim
+FROM --platform=linux/amd64 debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
@@ -10,7 +10,7 @@ RUN apt-get update \
WORKDIR /app
COPY Makefile ./
-COPY aoc-* ./
+COPY aoc-2025/ ./aoc-2025/
COPY README.md LICENSE ./
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
diff --git a/README.md b/README.md
index b9e1eed..afa8008 100644
--- a/README.md
+++ b/README.md
@@ -6,16 +6,31 @@ I don't particularly care about the AoC leaderboard. December is usually a prett
AoC gives each user their own puzzle input. I keep my inputs locally and do not commit them to this repository. If you're running these solutions yourself, you'll need to provide your own inputs in whatever format the corresponding solution expects.
## Docker
-To build the Docker image, run this from the repository root:
+The solutions are Linux x64 ELF binaries, so they don't run natively on macOS or Windows. The image bundles `nasm`, `ld`, and `make`. It's pinned to `linux/amd64`; on Apple Silicon it runs under emulation automatically (you'll see a harmless platform-mismatch warning).
+
+Build the image from the repository root:
```sh
docker build -t aoc .
```
-To run a specific day:
+List the available days:
+
+```sh
+docker run --rm aoc list
+```
+
+### Inputs
+AoC inputs are per-user and are not committed to this repo. Put your input for a given day at `input/dayN.txt` in the repository root, then mount that directory when running so the solution can read it:
+
+```sh
+docker run --rm -v "$PWD/input:/app/input" aoc day5
+```
+
+Assemble and link every day without running it — a quick build check that needs no input:
```sh
-docker run --rm aoc YEAR=2025 DAY=5
+docker run --rm aoc all
```
When you're done, remove the image with: