Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

container ubi - fix build using DockerfileUBI #1140

Merged
merged 2 commits into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions DockerfileUBI
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

##### Monocle binary build #####

FROM registry.access.redhat.com/ubi8/ubi as ubi-builder
FROM registry.access.redhat.com/ubi9/ubi as ubi-builder

# Install gpg keys
RUN gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 7D1E8AFD1D4A16D71FADA2F2CCC85C0E40C06A8C
Expand All @@ -43,7 +43,7 @@ RUN dnf install -y \
gcc-c++


ARG GHC=9.4.6
ARG GHC=9.6.6
ARG CABAL=latest

# Install GHC and cabal
Expand All @@ -57,7 +57,6 @@ RUN dnf install -y \
openssl-devel \
gmp-devel \
ncurses-devel \
ncurses-compat-libs \
zlib-devel

# Copy source tree
Expand All @@ -71,7 +70,7 @@ RUN cd /build && \

##### Monocle Web UI build #####

FROM registry.fedoraproject.org/fedora:35 as web-builder
FROM registry.fedoraproject.org/fedora:41 as web-builder

RUN dnf update -y && dnf install -y nodejs git

Expand All @@ -97,12 +96,7 @@ RUN sed -e 's|-bs-no-version-header|-bs-no-version-header", "-warn-error -a+5+6+

##### Setup final image #####

FROM registry.access.redhat.com/ubi8/ubi
FROM registry.access.redhat.com/ubi9/ubi-minimal

COPY --from=ubi-builder /monocle /bin/
COPY --from=web-builder /monocle-webapp/build /usr/share/monocle/webapp/

# Ensure runtime commands
RUN dnf install -y curl && \
dnf clean all && \
rm -rf /var/cache/yum
7 changes: 7 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,10 @@ codegen-openapi:
set -euxo pipefail
protoc {{PINCLUDE}} --openapi_out=./doc/ monocle/protob/http.proto
echo Created doc/openapi.yaml

# Generate the cabal-override.project
[private]
codegen-cabal-override:
nix develop --command cabal freeze
mv cabal.project.freeze cabal-override.project
cat cabal-override.project.tmpl >> cabal-override.project
Loading
Loading