| 1 | # Bun baseline MicroVM — the dumbest possible Bun HTTP server, built the EXACT |
| 2 | # same way alchemy's effectful image is built (same MicroVM base, same bun |
| 3 | # install via the official installer). The ONLY difference from the effectful |
| 4 | # `EffectfulBun` image is the server code: a raw `Bun.serve({ fetch })` with no |
| 5 | # Effect runtime, no alchemy bootstrap, no RPC protocol. Any time-to-usable |
| 6 | # gap between this and the effectful variant is the alchemy/Effect cold-start |
| 7 | # tax, with runtime (bun) and CPU arch (ARM_64) held constant. |
| 8 | FROM public.ecr.aws/lambda/microvms:al2023-minimal |
| 9 | |
| 10 | RUN dnf install -y unzip tar && curl -fsSL https://bun.sh/install | bash && ln -s /root/.bun/bin/bun /usr/local/bin/bun && dnf clean all |
| 11 | |
| 12 | WORKDIR /app |
| 13 | COPY server.js . |
| 14 | |
| 15 | EXPOSE 8080 |
| 16 | ENV PORT=8080 |
| 17 | ENTRYPOINT ["bun", "/app/server.js"] |