-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker: Start the build with the portal image instead of invenio
- Loading branch information
Showing
2 changed files
with
5 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,47 +22,8 @@ | |
# waive the privileges and immunities granted to it by virtue of its status | ||
# 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.9 | ||
ENV XROOTD_VERSION=5.6.9 | ||
|
||
# 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 [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] | ||
|
||
# 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 | ||
# hadolint ignore=DL3007 | ||
FROM registry.cern.ch/cernopendata/cernopendata-portal:latest | ||
|
||
# Add CERN Open Data Portal sources to `code` and work there | ||
WORKDIR ${CODE_DIR} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,9 @@ set -o nounset | |
mkdir -p "${INVENIO_INSTANCE_PATH}" | ||
cd "${INVENIO_INSTANCE_PATH}"/static | ||
|
||
# cleanup the previous installation | ||
rm -rf "${INVENIO_INSTANCE_PATH}"/static/* | ||
|
||
npm install git+https://github.com/cernopendata/demobbed-viewer.git --prefix $INVENIO_INSTANCE_PATH/static | ||
npm install [email protected] --prefix $INVENIO_INSTANCE_PATH/static | ||
|
||
|