Introduce a Makefile that builds libtoastyfs.a and libtoastyfs.so from the client-side sources (client, tcp, byte_queue, message, basic) so external programs can link against the ToastyFS client API in include/toastyfs.h. Add a Dockerfile and docker-compose.yml that spin up a 3-node ToastyFS server cluster on a private bridge network with ports 8081-8083 exposed on the host. Include cluster.sh as a convenience wrapper (up/down/status/ logs/run) — the "run" sub-command builds the library, compiles a user- supplied C source against it, starts the cluster, and executes the binary. Add examples/example.c demonstrating synchronous PUT, GET, DELETE, and a NOT_FOUND verification. https://claude.ai/code/session_019DVhmc25jfzcHnmdNxzib2
13 lines
261 B
Docker
13 lines
261 B
Docker
FROM gcc:latest AS build
|
|
WORKDIR /build
|
|
COPY src/ src/
|
|
COPY include/ include/
|
|
COPY quakey/ quakey/
|
|
COPY Makefile .
|
|
RUN make toastyfs
|
|
|
|
FROM debian:bookworm-slim
|
|
RUN mkdir -p /data
|
|
COPY --from=build /build/toastyfs /usr/local/bin/toastyfs
|
|
ENTRYPOINT ["toastyfs"]
|