Skip to content

Commit

Permalink
Add fixes to web container build
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaSBrown committed Mar 7, 2024
1 parent 6f6206d commit 201fae4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 2 additions & 1 deletion docker/Dockerfile.dependencies
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ COPY ./scripts/utils.sh ${BUILD_DIR}/scripts/utils.sh
COPY ./scripts/install_core_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/install_docs_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/install_repo_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/install_ws_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/install_authz_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./web/package.json ${BUILD_DIR}/web/package.json
COPY ./scripts/install_ws_dependencies.sh ${BUILD_DIR}/scripts/
COPY ./scripts/generate_datafed.sh ${BUILD_DIR}/scripts/generate_datafed.sh

RUN echo "#!/bin/bash\n\$@" > /usr/bin/sudo && chmod +x /usr/bin/sudo
Expand Down
9 changes: 3 additions & 6 deletions web/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ COPY --chown=datafed:root ./scripts/install_ws.sh ${BUILD_DIR}/sc
COPY --chown=datafed:root ./cmake/Version.cmake ${BUILD_DIR}/cmake/Version.cmake
COPY --chown=datafed:root ./scripts/utils.sh ${BUILD_DIR}/scripts/utils.sh
COPY --chown=datafed:root ./scripts/export_dependency_version.sh ${BUILD_DIR}/scripts/export_dependency_version.sh
COPY --from=ws-build --chown=datafed:root ${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm ${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm
COPY --from=ws-build --chown=datafed:root ${BUILD_DIR}/web ${BUILD_DIR}/web
COPY --from=ws-build --chown=datafed:root ${DATAFED_INSTALL_PATH} ${DATAFED_INSTALL_PATH}
COPY --from=ws-build --chown=datafed:root ${DATAFED_DEPENDENCIES_INSTALL_PATH} ${DATAFED_DEPENDENCIES_INSTALL_PATH}
COPY --from=ws-build --chown=datafed:root ${DATAFED_INSTALL_PATH}/web ${DATAFED_INSTALL_PATH}/web
COPY --from=ws-build --chown=datafed:root /usr/bin/curl /usr/bin/curl

RUN chown -R datafed:root ${DATAFED_INSTALL_PATH}/web
Expand All @@ -87,10 +87,7 @@ RUN chown -R datafed:root ${BUILD_DIR}
WORKDIR ${DATAFED_DIR}

RUN echo "${DATAFED_DIR}"
RUN . ${BUILD_DIR}/scripts/export_dependency_version.sh && \
. ${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm/nvm.sh && \
npm --allow-root --unsafe-perm --prefix ${DATAFED_INSTALL_PATH}/web install

USER root

ENTRYPOINT ["/datafed/source/web/docker/entrypoint.sh", "/opt/datafed/web/datafed-ws.js", "/datafed/source/config/datafed-ws.cfg" ]
ENTRYPOINT ["/datafed/source/web/docker/entrypoint.sh", "/datafed/source/web/datafed-ws.js", "/datafed/source/config/datafed-ws.cfg" ]
1 change: 0 additions & 1 deletion web/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ PROJECT_ROOT=$(realpath "${SOURCE}/../..")

"${PROJECT_ROOT}/scripts/generate_datafed.sh"
"${PROJECT_ROOT}/scripts/generate_ws_config.sh"
"${PROJECT_ROOT}/scripts/install_ws.sh"
. "${PROJECT_ROOT}/scripts/dependency_versions.sh"

export NVM_DIR="${DATAFED_DEPENDENCIES_INSTALL_PATH}/nvm"
Expand Down

0 comments on commit 201fae4

Please sign in to comment.