-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hopefully smaller and faster docker builds
- Loading branch information
Showing
4 changed files
with
49 additions
and
17 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,14 +1,22 @@ | ||
FROM python:3.11.4 | ||
FROM python:3.11.9 | ||
|
||
WORKDIR /app | ||
|
||
# Setup Python prerequisites | ||
RUN pip3 install --upgrade pip poetry setuptools wheel | ||
RUN pip3 install --upgrade pip poetry==1.8.3 setuptools wheel | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
# Build Python project | ||
COPY reginald reginald | ||
COPY pyproject.toml . | ||
COPY README.md . | ||
RUN poetry install | ||
RUN touch README.md | ||
RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR | ||
|
||
COPY reginald reginald | ||
|
||
RUN poetry install --without dev | ||
|
||
CMD ["poetry", "run", "reginald", "create-index"] |
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,14 +1,22 @@ | ||
FROM python:3.11.4 | ||
FROM python:3.11.9 | ||
|
||
WORKDIR /app | ||
|
||
# Setup Python prerequisites | ||
RUN pip3 install --upgrade pip poetry setuptools wheel | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
# Build Python project | ||
COPY reginald reginald | ||
COPY pyproject.toml . | ||
COPY README.md . | ||
RUN poetry install --extras api_bot | ||
RUN touch README.md | ||
RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR | ||
|
||
COPY reginald reginald | ||
|
||
RUN poetry install --extras api_bot --without dev | ||
|
||
CMD ["poetry", "run", "reginald", "app"] |
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,14 +1,22 @@ | ||
FROM python:3.11.4 | ||
FROM python:3.11.9 | ||
|
||
WORKDIR /app | ||
|
||
# Setup Python prerequisites | ||
RUN pip3 install --upgrade pip poetry setuptools wheel | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
# Build Python project | ||
COPY reginald reginald | ||
COPY pyproject.toml . | ||
COPY README.md . | ||
RUN poetry install | ||
RUN touch README.md | ||
RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR | ||
|
||
COPY reginald reginald | ||
|
||
RUN poetry install --without dev | ||
|
||
CMD ["poetry", "run", "reginald", "run-all"] |
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,14 +1,22 @@ | ||
FROM python:3.11.4 | ||
FROM python:3.11.9 | ||
|
||
WORKDIR /app | ||
|
||
# Setup Python prerequisites | ||
RUN pip3 install --upgrade pip poetry setuptools wheel | ||
|
||
ENV POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=1 \ | ||
POETRY_VIRTUALENVS_CREATE=1 \ | ||
POETRY_CACHE_DIR=/tmp/poetry_cache | ||
|
||
# Build Python project | ||
COPY reginald reginald | ||
COPY pyproject.toml . | ||
COPY README.md . | ||
RUN poetry install --extras api_bot | ||
RUN touch README.md | ||
RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR | ||
|
||
COPY reginald reginald | ||
|
||
RUN poetry install --extras api_bot --without dev | ||
|
||
CMD ["poetry", "run", "reginald", "bot"] |