diff options
| author | 2021-05-16 18:57:27 +0200 | |
|---|---|---|
| committer | 2021-05-16 18:57:27 +0200 | |
| commit | 3d3a0354053484fc8bf490a0438746f3bc14fc8e (patch) | |
| tree | 06655fe9d69758bd1eaad8133cd6c50aa1ecc5e7 /Dockerfile | |
| parent | Spring cleanup (#718) (diff) | |
| parent | Type hint optional parameter (diff) | |
Merge pull request #623 from python-discord/pipenv-to-poetry
Pipenv to poetry
Diffstat (limited to 'Dockerfile')
| -rw-r--r-- | Dockerfile | 33 |
1 files changed, 16 insertions, 17 deletions
@@ -1,32 +1,31 @@ -FROM python:3.8-slim +FROM python:3.9-slim # Set pip to have cleaner logs and no saved cache ENV PIP_NO_CACHE_DIR=false \ - PIPENV_HIDE_EMOJIS=1 \ - PIPENV_IGNORE_VIRTUALENVS=1 \ - PIPENV_NOSPIN=1 + POETRY_VIRTUALENVS_CREATE=false -# Install pipenv -RUN pip install -U pipenv +# Install Poetry and add it to the path +RUN pip install --user poetry +ENV PATH="${PATH}:/root/.local/bin" -# Copy the project files into working directory WORKDIR /bot -# Copy dependency files -COPY Pipfile Pipfile.lock ./ +# Copy dependencies and lockfile +COPY pyproject.toml poetry.lock /bot/ -# Install project dependencies -RUN pipenv install --deploy --system +# Install dependencies and lockfile, excluding development +# dependencies, +RUN poetry install --no-dev --no-interaction --no-ansi -# Copy project code -COPY . . - -# Set Git SHA enviroment variable +# Set SHA build argument ARG git_sha="development" ENV GIT_SHA=$git_sha -ENTRYPOINT ["python"] -CMD ["-m", "bot"] +# Copy the rest of the project code +COPY . . + +# Start the bot +CMD ["python", "-m", "bot"] # Define docker persistent volumes VOLUME /bot/bot/log /bot/data |