Skip to content

Commit

Permalink
Merge pull request #1140 from morucci/container-build-ubi
Browse files Browse the repository at this point in the history
container ubi - fix build using DockerfileUBI
  • Loading branch information
mergify[bot] authored Jan 7, 2025
2 parents 1fefbf3 + dc4b209 commit 92faaad
Show file tree
Hide file tree
Showing 7 changed files with 385 additions and 45 deletions.
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

0 comments on commit 92faaad

Please sign in to comment.