updated Dockerfile

pull/2/head
frederic 2024-02-02 00:49:30 +01:00
parent f86e9ffbad
commit f61240d53a
1 changed files with 14 additions and 9 deletions

View File

@ -11,12 +11,11 @@ ENV PIP_DEFAULT_TIMEOUT=100 \
PIP_NO_CACHE_DIR=1 \
# Poetry:
POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_CACHE_DIR='/var/cache/pypoetry' \
POETRY_HOME='/usr/local' \
POETRY_VIRTUALENVS_CREATE=true \
POETRY_CACHE_DIR='/code/poetry-cache' \
POETRY_HOME='/code/poetry' \
POETRY_VERSION=1.7.1
RUN apt-get update && apt-get upgrade -y \
&& apt-get install --no-install-recommends -y \
bash \
@ -31,17 +30,23 @@ RUN apt-get update && apt-get upgrade -y \
# Installing `poetry`:
&& curl -sSL 'https://install.python-poetry.org' | python - \
&& poetry --version \
&& /code/poetry/bin/poetry --version \
# Cleaning cache:
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/*
WORKDIR /code
RUN groupadd -g "1000" -r web \
&& useradd -d '/code' -g web -l -r -u "1000" web \
&& chown web:web -R '/code'
RUN git clone https://code.hackerspace.pl/etorameth/labelmaker
WORKDIR /labelmaker
RUN poetry install --no-interaction --no-ansi --sync
WORKDIR /code/labelmaker
RUN useradd web
USER web
CMD poetry run python labelmaker/main.py
RUN /code/poetry/bin/poetry install --no-interaction --no-ansi --sync
CMD /code/poetry/bin/poetry run python labelmaker/main.py