-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
197 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,29 @@ | ||
ARG PYTHON_VERSION | ||
FROM python:${version}-slim-bookworm | ||
ARG PYTHON_VERSION=3.10 | ||
FROM python:${PYTHON_VERSION}-slim-bookworm | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
WORKDIR /workspace | ||
RUN pip install --upgrade pip \ | ||
&& apt-get update \ | ||
&& apt-get install -y \ | ||
freetds-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
&& apt-get install -y freetds-dev \ | ||
&& apt-get install -y make \ | ||
# no real need for keeping this image small at the moment | ||
&& :; # rm -rf /var/lib/apt/lists/* | ||
|
||
# install poetry | ||
RUN bash -c 'python -m venv /opt/poetry-venv && source $_/bin/activate && pip install poetry && ln -s $(which poetry) /usr/bin' | ||
|
||
# install requirements we exported from poetry | ||
COPY build/requirements.txt requirements.txt | ||
RUN pip install -r requirements.txt | ||
# install dependencies with poetry | ||
COPY pyproject.toml . | ||
COPY poetry.lock . | ||
RUN poetry install --all-extras --with dev --no-root | ||
|
||
# copy project source | ||
COPY . . | ||
|
||
# install project with poetry | ||
RUN poetry install --all-extras --with dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters