|
1 |
| -########################################## |
2 |
| -FROM jrottenberg/ffmpeg:3.2-ubuntu AS base |
3 |
| -########################################## |
4 |
| -RUN apt-get update && apt-get install -y python3.8 pip git |
| 1 | +########################################### |
| 2 | +FROM jrottenberg/ffmpeg:4.1-ubuntu AS base |
| 3 | +########################################### |
| 4 | +ENV PYTHONDONTWRITEBYTECODE=1 \ |
| 5 | + PYTHONUNBUFFERED=1 \ |
| 6 | + PIP_NO_CACHE_DIR=off \ |
| 7 | + PIP_DISABLE_PIP_VERSION_CHECK=on \ |
| 8 | + POETRY_NO_INTERACTION=1 |
5 | 9 |
|
6 |
| -################# |
| 10 | +RUN apt-get update && \ |
| 11 | + apt-get install -y python3.8 pip git && \ |
| 12 | + apt-get install --no-install-recommends -y curl build-essential && \ |
| 13 | + apt-get clean |
| 14 | + |
| 15 | +################## |
7 | 16 | FROM base AS apg
|
8 |
| -################# |
9 |
| -ARG APG_DIR=/audio_program_generator/ |
| 17 | +################## |
10 | 18 | WORKDIR /
|
11 |
| -COPY ./entry.sh entry.sh |
12 |
| - |
13 | 19 | RUN mkdir /apg && \
|
14 |
| - git clone https://github.com/jeffwright13/audio_program_generator.git && \ |
15 |
| - pip install poetry && \ |
16 |
| - cd $APG_DIR && \ |
17 |
| - poetry install --no-dev |
| 20 | + git clone https://github.com/jeffwright13/audio_program_generator.git |
| 21 | + |
| 22 | +################### |
| 23 | +FROM apg AS poetry |
| 24 | +################### |
| 25 | +ARG APG_SRC_DIR=/audio_program_generator |
| 26 | +WORKDIR $APG_SRC_DIR |
| 27 | +RUN pip install --no-cache-dir poetry |
18 | 28 |
|
19 | 29 | ###################
|
20 |
| -FROM apg AS runtime |
| 30 | +FROM poetry AS run |
21 | 31 | ###################
|
| 32 | +ARG APG_SRC_DIR=/audio_program_generator |
| 33 | +WORKDIR $APG_SRC_DIR |
| 34 | +COPY ./entry-run.sh entry-run.sh |
| 35 | +RUN cd $APG_SRC_DIR && \ |
| 36 | + poetry install --no-interaction --no-dev |
| 37 | + |
| 38 | +ENTRYPOINT ["/bin/bash"] |
| 39 | +CMD ["/audio_program_generator/entry-run.sh"] |
| 40 | + |
| 41 | +#################### |
| 42 | +FROM poetry AS test |
| 43 | +#################### |
| 44 | +ARG APG_SRC_DIR=/audio_program_generator |
| 45 | +COPY ./entry-test.sh ./entry-test.sh |
| 46 | +RUN cd $APG_SRC_DIR && \ |
| 47 | + poetry install --no-interaction |
| 48 | +RUN ln -s $(poetry env info --path) /var/my-venv |
| 49 | +RUN echo 'source /var/my-venv/bin/activate' >> ~/.bashrc |
| 50 | + |
22 | 51 | ENTRYPOINT ["/bin/bash"]
|
23 |
| -CMD ["/entry.sh"] |
| 52 | +CMD ["/audio_program_generator/entry-test.sh"] |
0 commit comments