this repo has no description
1# Set things up
2FROM alpine:latest as build
3RUN apk add clang python3
4ARG VER=3.4.0
5RUN wget https://cosmo.zip/pub/cosmocc/cosmocc-$VER.zip
6WORKDIR cosmo
7RUN unzip ../cosmocc-$VER.zip
8COPY scrapscript.py .
9COPY compiler.py .
10COPY runtime.c .
11COPY examples/11_platforms/web/ .
12RUN CC=bin/cosmocc python3 compiler.py --compile --platform web.c handler.scrap
13RUN bin/assimilate a.out
14RUN du -sh a.out
15
16# Set up the container
17FROM scratch as server
18COPY --from=build /cosmo/a.out .
19EXPOSE 8000
20ENTRYPOINT ["./a.out"]
21
22# Deploy from the repo root with
23# fly deploy --dockerfile examples/11_platforms/web/Dockerfile --local-only --config examples/11_platforms/web/fly.toml