Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536FROM caddy as webCOPY . .RUN echo ":8000" > /etc/caddy/CaddyfileRUN echo "rewrite /repl /util/repl.html" >> /etc/caddy/CaddyfileRUN echo "rewrite /compilerepl /util/compilerepl.html" >> /etc/caddy/CaddyfileRUN echo "rewrite /style.css /util/style.css" >> /etc/caddy/CaddyfileRUN echo "log" >> /etc/caddy/CaddyfileRUN echo "file_server" >> /etc/caddy/Caddyfile
FROM alpine:latest as buildRUN printf -- '-m\nscrapscript\n...' > .argsRUN wget https://cosmo.zip/pub/cosmos/bin/assimilateRUN wget https://cosmo.zip/pub/cosmos/bin/ape-x86_64.elfRUN wget https://cosmo.zip/pub/cosmos/bin/pythonRUN wget https://cosmo.zip/pub/cosmos/bin/zipRUN chmod +x assimilateRUN chmod +x ape-x86_64.elfRUN chmod +x pythonRUN chmod +x zipRUN mkdir LibCOPY scrapscript.py Lib/COPY compiler.py Lib/COPY runtime.c Lib/COPY cli.c Lib/RUN ./ape-x86_64.elf ./python -m compileall -b Lib/scrapscript.py Lib/compiler.pyRUN mv python scrapscript.comRUN ./ape-x86_64.elf ./zip -r scrapscript.com Lib .argsRUN ./ape-x86_64.elf ./assimilate ./scrapscript.comRUN echo "Testing..."RUN ./scrapscript.com apply "1+2"
# Set up the containerFROM scratch as mainCOPY --from=build scrapscript.com .ENTRYPOINT ["./scrapscript.com"]