# standalone mode
FROM base AS nuitka
RUN nuitka --standalone \
scraper.py
RUN cd scraper.dist \
&& upx -9 scraper.bin
# onefile mode
FROM base AS nuitka
RUN nuitka --onefile scraper.py
# standalone mode
FROM alpine:latest
COPY --from=nuitka \
/app/scraper.dist/ /app/
WORKDIR /app
ENTRYPOINT ["/app/scraper.bin"]
# onefile mode
FROM alpine:latest
COPY --from=nuitka \
/app/scraper.bin /app/
WORKDIR /app
ENTRYPOINT ["/app/scraper.bin"]