From d70bed945557bfecae3d243ab5e0e326e2c8f3b9 Mon Sep 17 00:00:00 2001 From: donsizemore Date: Tue, 18 Nov 2025 10:48:52 -0500 Subject: [PATCH 1/3] initial Dockerfile stub, fails writing to /build/dataverse-globus --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f7fb5e0 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# build with $ podman build -f Dockerfile -v "$(pwd)":/build/dataverse-globus --userns-uid-map=0:1000:1 -t dataverse-globus . +# run with $ podman run --userns=keep-id -v "$(pwd)":/build/dataverse-globus dataverse-globus + +# Use Rocky Linux 8 as base +FROM rockylinux:8 + +# Install required tools: git, curl, Node.js (LTS), npm +# using NodeJS:14 per ScholarsPortal README +RUN dnf -y module enable nodejs:14 + +RUN dnf -y install git curl nodejs && \ + dnf clean all + +# Set working directory +WORKDIR /build/dataverse-globus + +# Install npm dependencies +RUN npm install + +# Build Angular project +RUN npm run build From 40d1517372a93ef7c86188551e063707ad892e4e Mon Sep 17 00:00:00 2001 From: donsizemore Date: Tue, 18 Nov 2025 14:58:36 -0500 Subject: [PATCH 2/3] Dockerfile builds on Rocky 8, exports dist/ directory --- Dockerfile | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index f7fb5e0..49a28f4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,21 +1,30 @@ -# build with $ podman build -f Dockerfile -v "$(pwd)":/build/dataverse-globus --userns-uid-map=0:1000:1 -t dataverse-globus . -# run with $ podman run --userns=keep-id -v "$(pwd)":/build/dataverse-globus dataverse-globus +# build with $ podman build --target export --output type=local,dest=./dist . -# Use Rocky Linux 8 as base -FROM rockylinux:8 +# Use Rocky Linux 8 as base for now +FROM rockylinux:8 AS builder # Install required tools: git, curl, Node.js (LTS), npm # using NodeJS:14 per ScholarsPortal README RUN dnf -y module enable nodejs:14 -RUN dnf -y install git curl nodejs && \ +RUN dnf -y install curl nodejs && \ dnf clean all # Set working directory WORKDIR /build/dataverse-globus +# Copy package files first for better layer caching +COPY package*.json ./ + # Install npm dependencies RUN npm install +# Copy the rest of the application +COPY . . + # Build Angular project RUN npm run build + +# export dist to filesystem +FROM scratch AS export +COPY --from=builder /build/dataverse-globus/dist . From d21418eeeeaf7b1337d8830e8b815be9f1b35ec0 Mon Sep 17 00:00:00 2001 From: donsizemore Date: Wed, 19 Nov 2025 10:47:27 -0500 Subject: [PATCH 3/3] add Rocky 8 Dockerfile to build with Node:18 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 49a28f4..0507ef1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,8 @@ FROM rockylinux:8 AS builder # Install required tools: git, curl, Node.js (LTS), npm -# using NodeJS:14 per ScholarsPortal README -RUN dnf -y module enable nodejs:14 +# using NodeJS:18 per GDCC README +RUN dnf -y module enable nodejs:18 RUN dnf -y install curl nodejs && \ dnf clean all