-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathdownstream_dockerfile
More file actions
33 lines (24 loc) · 1.11 KB
/
downstream_dockerfile
File metadata and controls
33 lines (24 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#@follow_tag(registry.redhat.io/ubi8/nodejs-18:latest)
FROM registry.redhat.io/ubi8/nodejs-18:1-161 AS builder
# First copy the application source
COPY --chown=1001:0 $REMOTE_SOURCES/mig-ui/app $APP_ROOT/src
# Set up the build environment
USER root
ADD . .
# Needed dev packages for native builds
RUN dnf install -y openssl-devel python3
RUN dnf module install -y nodejs:18/development
# Source cachito environment
RUN source $REMOTE_SOURCES_DIR/mig-ui/cachito.env
# COPY cached node_modules and yarn cache for Berry
COPY --chown=1001:0 $REMOTE_SOURCES_DIR/mig-ui/deps/yarn-cache $APP_ROOT/src/.yarn/cache
# ✅ Build with Yarn Berry - uses vendored binary, no internet needed
ENV BRAND_TYPE="RedHat"
ENV CHROMEDRIVER_SKIP_DOWNLOAD=true \
SKIP_SASS_BINARY_DOWNLOAD_FOR_CI=true \
CYPRESS_INSTALL_BINARY=0
RUN container-entrypoint node .yarn/releases/yarn-*.cjs install --immutable
RUN container-entrypoint bash -c 'BRAND_TYPE=RedHat node .yarn/releases/yarn-*.cjs run build'
# Optional: may already be covered by vendoring
# RUN container-entrypoint yarn install --offline --production
RUN rm -rf $REMOTE_SOURCE_DIR