-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reapply "docker: Merge Dockerfiles into one again"
This reverts commit 57cd3c0.
- Loading branch information
Showing
4 changed files
with
30 additions
and
86 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,21 +1,45 @@ | ||
FROM ghcr.io/flathub-infra/backend-builder-base:latest AS builder | ||
FROM ubuntu:latest AS builder | ||
|
||
COPY pyproject.toml poetry.lock / | ||
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common \ | ||
&& add-apt-repository ppa:flatpak/stable | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
python3 python3-dev python3-pip python-is-python3 python3-venv \ | ||
build-essential libpq-dev libcairo2-dev libgirepository1.0-dev \ | ||
gir1.2-ostree-1.0 gir1.2-appstream-1.0 flatpak | ||
|
||
RUN python -m pip install --no-cache-dir --break-system-packages pipx && \ | ||
pipx install poetry && \ | ||
pipx inject poetry poetry-plugin-export | ||
|
||
COPY pyproject.toml poetry.lock / | ||
RUN /root/.local/bin/poetry export -f requirements.txt --output requirements.txt && \ | ||
python -m venv /venv && \ | ||
/venv/bin/python -m pip install --no-cache-dir -r requirements.txt | ||
|
||
FROM ghcr.io/flathub-infra/backend-base:latest | ||
FROM ubuntu:latest | ||
ARG SENTRY_RELEASE | ||
ENV PATH="/venv/bin:$PATH" | ||
|
||
EXPOSE 8000 | ||
RUN apt-get update && apt-get install -y --no-install-recommends software-properties-common \ | ||
&& add-apt-repository ppa:flatpak/stable | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
python3 python-is-python3 python3-venv ca-certificates libcairo2 libpq5 \ | ||
libgirepository-1.0-1 gir1.2-ostree-1.0 gir1.2-appstream-1.0 flatpak && \ | ||
apt-get clean && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN flatpak --user remote-add flathub https://flathub.org/repo/flathub.flatpakrepo && \ | ||
flatpak --user remote-add flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo | ||
|
||
COPY --from=builder /venv /venv | ||
COPY . /app | ||
WORKDIR /app | ||
|
||
ENV SENTRY_RELEASE="$SENTRY_RELEASE" | ||
ENV PATH="/venv/bin:$PATH" \ | ||
SENTRY_RELEASE="$SENTRY_RELEASE" | ||
|
||
EXPOSE 8000 | ||
|
||
CMD ["/app/docker-entrypoint.sh"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.