-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
743b2cc
commit f6ff34b
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |