⇤ ← Revision 1 as of 2019-03-25 05:47:29
369
Comment:
|
556
|
Deletions are marked like this. | Additions are marked like this. |
Line 2: | Line 2: |
* Run python script in docker envelope {{{ $ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3 python }}} |
|
Line 3: | Line 6: |
* Python docker build file |
Docker Python build file
Run python script in docker envelope
$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp python:3 python
- Python docker build file
FROM python:3.7-alpine as base FROM base as builder RUN mkdir /install WORKDIR /install COPY requirements.txt /requirements.txt RUN pip install --install-option="--prefix=/install" -r /requirements.txt FROM base COPY --from=builder /install /usr/local COPY src /app WORKDIR /app CMD ["gunicorn", "-w 4", "main:app"]