diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b89d9c2a..05aad571 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -97,7 +97,7 @@ jobs: export IMAGE_DESC="IDC ${{matrix.image-name}} image (via idc-isle-buildkit commit ${{ github.sha }})" fi echo "FROM ${{ secrets.REPOSITORY }}/${{matrix.image-name}}:${{needs.setup.outputs.image-tag}}" | \ - docker build -t ${{ secrets.REPOSITORY }}/${{matrix.image-name}}:${{needs.setup.outputs.image-tag}} \ + docker build --network=host -t ${{ secrets.REPOSITORY }}/${{matrix.image-name}}:${{needs.setup.outputs.image-tag}} \ --label org.opencontainers.image.title="idc-isle-buildkit ${{matrix.image-name}}"\ --label org.opencontainers.image.description="${IMAGE_DESC}" \ --label org.opencontainers.image.url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/${{github.event.repository.default_branch}}/${{matrix.image-name}} \ @@ -146,7 +146,7 @@ jobs: fi export STATIC_TAG=$(docker images | grep ${{ secrets.REPOSITORY }}/drupal-static | awk '{print $2}') echo "FROM ${{ secrets.REPOSITORY }}/drupal-static:${STATIC_TAG}" | \ - docker build -t ${{ secrets.REPOSITORY }}/drupal-static:${{needs.setup.outputs.image-tag}} \ + docker build --network=host -t ${{ secrets.REPOSITORY }}/drupal-static:${{needs.setup.outputs.image-tag}} \ --label org.opencontainers.image.title="idc-isle-buildkit drupal-static" \ --label org.opencontainers.image.description="${IMAGE_DESC}" \ --label org.opencontainers.image.url=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/tree/${{github.event.repository.default_branch}}/drupal \ diff --git a/abuild/Dockerfile b/abuild/Dockerfile index d1b72326..677a75cf 100644 --- a/abuild/Dockerfile +++ b/abuild/Dockerfile @@ -5,11 +5,13 @@ FROM alpine:3.14 RUN --mount=type=cache,target=/var/cache/apk \ --mount=type=cache,target=/etc/cache/apk \ ln -s /var/cache/apk /etc/apk/cache && \ + rm -rf /var/cache/apk/* && rm -rf /tmp/* && \ + apk update && \ apk add --update \ alpine-sdk \ coreutils \ sudo \ + procps \ && \ adduser -G abuild -g "Alpine Package Builder" -s /bin/ash -D builder && \ echo "builder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers - diff --git a/activemq/Dockerfile b/activemq/Dockerfile index 8e9dcec4..6097166d 100644 --- a/activemq/Dockerfile +++ b/activemq/Dockerfile @@ -1,10 +1,14 @@ # syntax=docker/dockerfile:experimental +ARG ACTIVEMQ_VERSION="5.16.3" + FROM local/java:latest as builder +ARG ACTIVEMQ_VERSION COPY rootfs/heartbeat-interval.patch / -RUN ACTIVEMQ_VERSION="5.16.3" && \ - ACTIVEMQ_GIT_REPO="https://github.com/apache/activemq" && \ +RUN apk --no-cache add git + +RUN ACTIVEMQ_GIT_REPO="https://github.com/apache/activemq" && \ ACTIVEMQ_GIT_TAG="activemq-${ACTIVEMQ_VERSION}" && \ mkdir -p /opt/builds && \ cd /opt/builds && \ @@ -31,13 +35,14 @@ RUN cd /opt/builds/activemq/assembly && \ FROM local/java:latest RUN mkdir -p /opt/downloads +ARG ACTIVEMQ_VERSION -COPY --from=builder /opt/builds/activemq/assembly/target/apache-activemq-5.16.3-bin.tar.gz /opt/downloads +COPY --from=builder /opt/builds/activemq/assembly/target/apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz /opt/downloads # install-apache-service.sh modified to not require a signed artifact RUN install-apache-service.sh \ --name activemq \ - --file /opt/downloads/apache-activemq-5.16.3-bin.tar.gz \ + --file /opt/downloads/apache-activemq-${ACTIVEMQ_VERSION}-bin.tar.gz \ examples webapps-demo docs WORKDIR /opt/activemq @@ -47,3 +52,4 @@ EXPOSE 61616 5672 61613 1883 61614 8161 COPY rootfs / RUN chown -R activemq:activemq /opt/activemq +RUN apk --no-cache add procps \ No newline at end of file diff --git a/build.gradle.kts b/build.gradle.kts index aa777d3b..51068195 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -4,10 +4,12 @@ buildscript { maven { url = uri("https://plugins.gradle.org/m2/") } + mavenCentral() } dependencies { classpath("ca.islandora:isle-gradle-docker-plugin:0.0.1") classpath("com.palantir.gradle.gitversion:gradle-git-version:0.12.3") + classpath("org.owasp:dependency-check-gradle:7.1.2") } } @@ -20,3 +22,4 @@ allprojects { } apply(plugin = "ca.islandora.gradle.docker") +apply(plugin = "org.owasp.dependencycheck") \ No newline at end of file diff --git a/demo/Dockerfile b/demo/Dockerfile index 0fc62ab9..cc94ea72 100644 --- a/demo/Dockerfile +++ b/demo/Dockerfile @@ -5,6 +5,7 @@ FROM local/nginx:latest as composer RUN --mount=type=cache,target=/root/.composer/cache \ --mount=id=downloads,type=cache,target=/opt/downloads \ DOWNLOAD_CACHE_DIRECTORY="/opt/downloads" && \ + mkdir -p /tmp/drupal/tmp && chown -R nginx: /tmp/drupal && chmod -R 775 /tmp/drupal/tmp && \ composer create-project islandora/drupal-project:8.8.1 \ --prefer-dist \ --no-interaction \ @@ -14,7 +15,18 @@ RUN --mount=type=cache,target=/root/.composer/cache \ /var/www/drupal \ && \ cd /var/www/drupal && \ - composer require --update-no-dev -- \ + mkdir -p /var/www/drupal/web/modules/contrib && \ + composer config extra.installer-paths --json '{"sites/all/modules/contrib/{$name}/": ["type:drupal-module"]}' && \ + composer config --no-plugins allow-plugins.cweagans/composer-patches true && \ + composer config --no-plugins allow-plugins.composer/installers true && \ + composer config --no-plugins allow-plugins.drupal/core-composer-scaffold true && \ + composer config --no-plugins allow-plugins.zaporylie/composer-drupal-optimizations true && \ + composer config --no-plugins allow-plugins.drupal/console-extend-plugin true && \ + composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true && \ + composer config repositories.1 '{"name": "islandora/chullo","type": "git","url": "https://github.com/Islandora/chullo.git","trunk-path" : "dev-dev#a7c1e051eab2a5077eaf5db2649201fa775c5a02"}' && \ + composer config repositories.1 --json '{"type": "package","package": {"name": "islandora/chullo","version": "dev-dev","type": "drupal-module","source": {"url": "https://github.com/Islandora/chullo.git","type": "git","reference": "a7c1e051eab2a5077eaf5db2649201fa775c5a02","canonical": false}}}' && \ + composer require "islandora/chullo:dev-dev as 1.x-dev" && \ + composer require --no-update -- \ drupal/admin_toolbar:^2.0 \ drupal/console:~1.0 \ drupal/content_browser:^1.0@alpha \ @@ -31,8 +43,8 @@ RUN --mount=type=cache,target=/root/.composer/cache \ islandora-rdm/islandora_fits:dev-master \ islandora/carapace:dev-8.x-3.x \ islandora/islandora_defaults:dev-8.x-1.x \ - zaporylie/composer-drupal-optimizations:^1.0 \ - && \ + islandora/openseadragon:dev-8.x-1.x \ + zaporylie/composer-drupal-optimizations:^1.0 && \ mkdir -p /var/www/drupal/web/libraries && \ MASONRY_VERSION="3.3.2" && \ MASONRY_FILE="v${MASONRY_VERSION}.zip" && \ @@ -40,7 +52,7 @@ RUN --mount=type=cache,target=/root/.composer/cache \ MASONRY_SHA256="85dc8b2cdf789693a14022dadc3e573a87d625da5da1cf83e1ef1e5af22af496" && \ download.sh --url "${MASONRY_URL}" --sha256 "${MASONRY_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \ unzip "${DOWNLOAD_CACHE_DIRECTORY}/${MASONRY_FILE}" -d /var/www/drupal/web/libraries && \ - mv /var/www/drupal/web/libraries/masonry-${MASONRY_VERSION} /var/www/drupal/web/libraries/masonry && \ + mv /var/www/drupal/web/libraries/masonry-${MASONRY_VERSION} /var/www/drupal/web/libraries/masonry && \ PDFJS_VERSION="2.0.943" && \ PDFJS_FILE="pdfjs-${PDFJS_VERSION}-dist.zip" && \ PDFJS_URL="https://github.com/mozilla/pdf.js/releases/download/v${PDFJS_VERSION}/${PDFJS_FILE}" && \ @@ -57,12 +69,14 @@ RUN --mount=type=cache,target=/root/.composer/cache \ unzip "${DOWNLOAD_CACHE_DIRECTORY}/${OPENSEADRAGON_FILE}" -d /var/www/drupal/web/sites/all/assets/vendor && \ mv "/var/www/drupal/web/sites/all/assets/vendor/${OPENSEADRAGON_FILE%.zip}" /var/www/drupal/web/sites/all/assets/vendor/openseadragon && \ mkdir -p /var/www/drupal/web/sites/default/files/library-definitions && \ - cp /var/www/drupal/web/modules/contrib/openseadragon/openseadragon.json /var/www/drupal/web/sites/default/files/library-definitions && \ + curl https://raw.githubusercontent.com/Islandora/openseadragon/8.x-1.x/openseadragon.json -o /var/www/drupal/web/sites/default/files/library-definitions/openseadragon.json && \ + # Something is wrong with where composer is installing modules. + # cp /var/www/drupal/web/modules/contrib/openseadragon/openseadragon.json /var/www/drupal/web/sites/default/files/library-definitions && \ chown -R nginx:nginx /var/www/drupal && \ cleanup.sh FROM local/drupal:latest - +RUN apk --no-cache add procps COPY --chown=nginx:nginx --from=composer /var/www/drupal /var/www/drupal COPY rootfs / diff --git a/drupal/rootfs/etc/cont-init.d/99-custom-setup.sh b/drupal/rootfs/etc/cont-init.d/99-custom-setup.sh index d1807e81..37244b9f 100644 --- a/drupal/rootfs/etc/cont-init.d/99-custom-setup.sh +++ b/drupal/rootfs/etc/cont-init.d/99-custom-setup.sh @@ -149,8 +149,12 @@ function main { # Install Composer modules if necessary. if [ -n "${DRUPAL_INSTANCE}" ] && [ "${DRUPAL_INSTANCE}" != "dev" ] ; then + # 9.4 Temp fix + COMPOSER_MEMORY_LIMIT=-1 composer config repositories.islandora/chullo '{"type": "git", "url": "https://github.com/Islandora/chullo.git", "reference": "a7c1e051eab2a5077eaf5db2649201fa775c5a02", "name": "islandora/chullo","version": "dev-dev"}' COMPOSER_MEMORY_LIMIT=-1 composer install else + # 9.4 Temp fix + COMPOSER_MEMORY_LIMIT=-1 composer config repositories.islandora/chullo '{"type": "git", "url": "https://github.com/Islandora/chullo.git", "reference": "a7c1e051eab2a5077eaf5db2649201fa775c5a02", "name": "islandora/chullo","version": "dev-dev"}' COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-install=auto fi diff --git a/matomo/Dockerfile b/matomo/Dockerfile index ec880803..e6a56400 100644 --- a/matomo/Dockerfile +++ b/matomo/Dockerfile @@ -10,7 +10,7 @@ RUN --mount=id=downloads,type=cache,target=/opt/downloads \ MATOMO_SIG_SHA256="7e33ba4ea7f44370157832940d177d524b21192985b03e795e9f05f037b0c453" && \ download.sh --url "${MATOMO_URL}" --sha256 "${MATOMO_FILE_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \ download.sh --url "${MATOMO_URL}.asc" --sha256 "${MATOMO_SIG_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \ - gpg --keyserver ha.pool.sks-keyservers.net --recv-keys 814E346FA01A20DBB04B6807B5DBD5925590A237 && \ + gpg --keyserver keyserver.ubuntu.com --recv-keys 814E346FA01A20DBB04B6807B5DBD5925590A237 && \ gpg --verify "${DOWNLOAD_CACHE_DIRECTORY}/${MATOMO_FILE}.asc" "${DOWNLOAD_CACHE_DIRECTORY}/${MATOMO_FILE}" && \ tar -xzf "${DOWNLOAD_CACHE_DIRECTORY}/${MATOMO_FILE}" -C /opt && \ chown -R nginx:nginx /opt/matomo && \ diff --git a/solr/Dockerfile b/solr/Dockerfile index a6fcaf58..e539621f 100644 --- a/solr/Dockerfile +++ b/solr/Dockerfile @@ -1,18 +1,22 @@ # syntax=docker/dockerfile:experimental FROM local/java:latest +RUN apk --no-cache add git + +ARG SOLR_VERSION="8.11.2" +ARG SOLR_KEYS="86EDB9C33B8517228E88A8F93E48C0C6EF362B9E" +ARG SOLR_FILE_SHA256="54d6ebd392942f0798a60d50a910e26794b2c344ee97c2d9b50e678a7066d3a6" +ARG SOLR_SIG_SHA256="1dc449783b89ae9287d1e31db0514d62aeb6edce199d541a29303e8d5c98d31e" + RUN --mount=id=downloads,type=cache,target=/opt/downloads \ DOWNLOAD_CACHE_DIRECTORY="/opt/downloads" && \ - SOLR_VERSION="8.11.1" && \ SOLR_FILE="solr-${SOLR_VERSION}.tgz" && \ - SOLR_URL="https://dlcdn.apache.org/lucene/solr/${SOLR_VERSION}/${SOLR_FILE}" && \ - SOLR_FILE_SHA256="9ec540cbd8e45f3d15a6b615a22939f5e6242ca81099951a47d3c082c79866a9" && \ - SOLR_SIG_SHA256="6a1eca93d0d0a80647cb60063f5e46347350b03a0f75b6a662d1b0a4746dabba" && \ + SOLR_URL="https://archive.apache.org/dist/lucene/solr/${SOLR_VERSION}/${SOLR_FILE}" && \ download.sh --url "${SOLR_URL}" --sha256 "${SOLR_FILE_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \ download.sh --url "${SOLR_URL}.asc" --sha256 "${SOLR_SIG_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \ install-apache-service.sh \ --name solr \ - --key "CFCE5FBB920C3C745CEEE084C38FF5EC3FCFDB3E" \ + --key "${SOLR_KEYS}" \ --file "${DOWNLOAD_CACHE_DIRECTORY}/${SOLR_FILE}" \ docs example licenses server/solr/configsets diff --git a/solr/README.md b/solr/README.md index e64cb57a..623d408f 100644 --- a/solr/README.md +++ b/solr/README.md @@ -1,6 +1,6 @@ # Solr -Docker image for [Solr] version 7.1.0. +Docker image for [Solr] version 8.11.2. Please refer to the [Solr Documentation] for more in-depth information. @@ -35,6 +35,6 @@ additional settings, volumes, ports, etc. | :----------------------------- | :------------- | | /opt/solr/server/logs/solr.log | [Solr Logging] | -[Solr Documentation]: https://lucene.apache.org/solr/guide/7_1/ -[Solr Logging]: https://lucene.apache.org/solr/guide/7_1/configuring-logging.html +[Solr Documentation]: https://lucene.apache.org/solr/guide/8_11/ +[Solr Logging]: https://lucene.apache.org/solr/guide/8_11/configuring-logging.html [Solr]: https://lucene.apache.org/solr/ diff --git a/solr/rootfs/etc/cont-init.d/02-solr-setup.sh b/solr/rootfs/etc/cont-init.d/02-solr-setup.sh index c5aceecf..d43fa0ec 100755 --- a/solr/rootfs/etc/cont-init.d/02-solr-setup.sh +++ b/solr/rootfs/etc/cont-init.d/02-solr-setup.sh @@ -1,6 +1,7 @@ #!/usr/bin/with-contenv bash set -e +apk update && apk --no-cache add procps # Copy the solr config cp /solr_config/* /opt/solr/server/solr/ISLANDORA/conf/