Skip to content

Commit

Permalink
Add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tekknolagi committed Nov 29, 2023
1 parent 743b2cc commit f6ff34b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Set things up
FROM alpine:latest as build
ARG VER=3.0.2
ARG COSMO=cosmos-$VER.zip
RUN wget https://github.com/jart/cosmopolitan/releases/download/$VER/$COSMO
WORKDIR cosmo
RUN unzip ../$COSMO bin/ape.elf bin/assimilate bin/bash bin/python bin/zip
RUN mkdir Lib
COPY scrapscript.py Lib
RUN bin/ape.elf bin/python -m compileall Lib
RUN mv Lib/__pycache__/scrapscript*.pyc Lib/scrapscript.pyc
RUN rm Lib/scrapscript.py
RUN sh bin/zip -A -r bin/python Lib
RUN bin/ape.elf bin/assimilate bin/python

# Set up the container
FROM scratch
COPY --from=build /cosmo/bin/python .
EXPOSE 8000
ENTRYPOINT ["./python", "-m", "scrapscript"]
CMD ["repl"]

0 comments on commit f6ff34b

Please sign in to comment.