Skip to content

Commit

Permalink
container: unsplit build containers
Browse files Browse the repository at this point in the history
After the introduction of `pyexternals` as a dependency to `external` in
the Makefile targets the Go container also wants to build Python
externals.

Let's instead turn everything into a single build container.

Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
  • Loading branch information
supakeen committed Oct 11, 2024
1 parent 902ed9a commit 0709d83
Showing 1 changed file with 7 additions and 16 deletions.
23 changes: 7 additions & 16 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -1,30 +1,21 @@
FROM registry.fedoraproject.org/fedora:latest AS build_python
FROM registry.fedoraproject.org/fedora:latest AS build

RUN dnf install -y \
python3-pip \
python3-pyyaml \
golang \
&& dnf clean all

WORKDIR /src

COPY Makefile .
COPY pyproject.toml /src/
COPY src /src/src

RUN pip install --no-dependencies .

# ----
FROM registry.fedoraproject.org/fedora:latest AS build_go

WORKDIR /src

RUN dnf install -y \
golang

COPY Makefile .

RUN make external

# ----
# no osbuild-depsolve-dnf here:
# FROM registry.access.redhat.com/ubi9/ubi-minimal
FROM registry.fedoraproject.org/fedora:latest
Expand All @@ -34,11 +25,11 @@ RUN dnf install -y \
osbuild-depsolve-dnf \
&& dnf clean all

COPY --from=build_python /usr/local/bin/otk /usr/local/bin/
COPY --from=build_python /usr/local/bin/osbuild* /usr/libexec/otk/external/
COPY --from=build_python /usr/local/lib/ /usr/local/lib/
COPY --from=build /usr/local/bin/otk /usr/local/bin/
COPY --from=build /usr/local/bin/osbuild* /usr/libexec/otk/external/
COPY --from=build /usr/local/lib/ /usr/local/lib/

COPY --from=build_go /src/external/* /usr/local/libexec/otk/external/
COPY --from=build /src/external/* /usr/local/libexec/otk/external/

WORKDIR /app

Expand Down

0 comments on commit 0709d83

Please sign in to comment.