From 703d73cab058fbbf46e5f50527914c80228839bc Mon Sep 17 00:00:00 2001 From: Timur Khadimullin Date: Sun, 24 Oct 2021 15:22:10 +1300 Subject: [PATCH] added basic Dockerfile this config builds a small-ish (141Mb) docker image and allows running the tool via command line: ``` docker build . -t zspotify docker run --rm -it zspotify ``` --- Dockerfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..ceb88cf2 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM python:3.9-alpine as base + +RUN apk --update add git ffmpeg + +FROM base as builder +RUN mkdir /install +WORKDIR /install +COPY requirements.txt /requirements.txt +RUN apk add gcc libc-dev zlib zlib-dev jpeg-dev \ + && pip install --prefix="/install" -r /requirements.txt + + +FROM base + +COPY --from=builder /install /usr/local +COPY src /app +COPY zs_config.json / +WORKDIR /app +ENTRYPOINT ["/usr/local/bin/python", "app.py"]