ChristopherGS / ultimate-fastapi-tutorial

The Ultimate FastAPI Tutorial
974 stars 334 forks source link

docker poetry install fail in part 13 #40

Open trbouma opened 1 year ago

trbouma commented 1 year ago

I get the following error below. How should I update the docker file to get this working? Thanks.

RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && cd /usr/local/bin && ln -s /opt/poetry/bin/poetry && poetry config virtualenvs.create false:

7 1.430 Retrieving Poetry metadata

7 1.549

7 1.555 This installer is deprecated, and scheduled for removal from the Poetry repository on or after January 1, 2023.

7 1.555 See https://github.com/python-poetry/poetry/issues/6377 for details.

7 1.555

7 1.555 You should migrate to https://install.python-poetry.org instead, which supports all versions of Poetry, and allows for self update of versions 1.1.7 or newer.

7 1.555 Instructions are available at https://python-poetry.org/docs/#installation.

7 1.555

7 1.555 Without an explicit version, this installer will attempt to install the latest version of Poetry.

7 1.555 This installer cannot install Poetry 1.2.0a1 or newer (and installs will be unable to self update to 1.2.0a1 or newer).

7 1.555

7 1.555 To continue to use this deprecated installer, you must specify an explicit version with --version or POETRY_VERSION=.

7 1.555 Alternatively, if you wish to force this deprecated installer to use the latest installable release, set GET_POETRY_IGNORE_DEPRECATION=1.

7 1.556

7 1.556 Version 1.2.2 is not supported by this installer! Please specify a version prior to 1.2.0a1 to continue!

Hanabiraa commented 1 year ago

In backend/Dockerfile you have to change the docker install source from

RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
    cd /usr/local/bin && \
    ln -s /opt/poetry/bin/poetry && \
    poetry config virtualenvs.create false

to this

RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python && \
    cd /usr/local/bin && \
    ln -s /opt/poetry/bin/poetry && \
    poetry config virtualenvs.create false

Or, if you do not want to change the source from which you will download the poetry installer, then add the line before poetry installation line:

GET_POETRY_IGNORE_DEPRECATION=1