Skip to content

Commit

Permalink
docker: Start the build with the portal image instead of invenio
Browse files Browse the repository at this point in the history
  • Loading branch information
psaiz committed Mar 13, 2024
1 parent 12f412b commit b037631
Showing 1 changed file with 1 addition and 40 deletions.
41 changes: 1 addition & 40 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,46 +23,7 @@
# as an Intergovernmental Organization or submit itself to any jurisdiction.

# Use Invenio's alma image with Python-3.9
FROM registry.cern.ch/inveniosoftware/almalinux:1

# Use XRootD 5.6.7
ENV XROOTD_VERSION=5.6.7

# Install CERN Open Data Portal web node pre-requisites
# hadolint ignore=DL3033
RUN yum install -y \
ca-certificates \
cmake3 \
epel-release \
libuuid-devel \
rlwrap \
vim && \
yum groupinstall -y "Development Tools" && \
yum clean -y all

RUN echo "Will install xrootd version: $XROOTD_VERSION (latest if empty)" && \
yum install -y xrootd-"$XROOTD_VERSION" python3-xrootd-"$XROOTD_VERSION" && \
yum clean -y all

RUN pip uninstall pipenv -y && pip install --upgrade pip==20.2.4 setuptools==68.2.2 wheel==0.36.2 && \
npm install -g --unsafe-perm node-sass@6.0.1 clean-css@3.4.24 requirejs@2.3.6 uglify-js@3.12.1 jsonlint@1.6.3 d3@6.3.1

# Change group to root to support OpenShift runtime
RUN chgrp -R 0 "${INVENIO_INSTANCE_PATH}" && \
chmod -R g=u "${INVENIO_INSTANCE_PATH}"

# Create `code` dir and set Invenio user as owner
ENV CODE_DIR=/code
RUN mkdir ${CODE_DIR} && chown invenio:root ${CODE_DIR}

# Run application as Invenio user
USER ${INVENIO_USER_ID}

# Set default Invenio user Python base for site-packages
ENV PYTHONUSERBASE=${INVENIO_INSTANCE_PATH}/python

# Add Invenio user Python base to global PATH
ENV PATH=$PATH:${INVENIO_INSTANCE_PATH}/python/bin
FROM registry.cern.ch/cernopendata/cernopendata-portal:latest

# Add CERN Open Data Portal sources to `code` and work there
WORKDIR ${CODE_DIR}
Expand Down

0 comments on commit b037631

Please sign in to comment.