Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft - 9 4 update #110

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}} \
Expand Down Expand Up @@ -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 \
Expand Down
4 changes: 3 additions & 1 deletion abuild/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

14 changes: 10 additions & 4 deletions activemq/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand All @@ -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
Expand All @@ -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
3 changes: 3 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand All @@ -20,3 +22,4 @@ allprojects {
}

apply(plugin = "ca.islandora.gradle.docker")
apply(plugin = "org.owasp.dependencycheck")
26 changes: 20 additions & 6 deletions demo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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 \
Expand All @@ -31,16 +43,16 @@ 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" && \
MASONRY_URL="https://github.com/desandro/masonry/archive/${MASONRY_FILE}" && \
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}" && \
Expand All @@ -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 /
4 changes: 4 additions & 0 deletions drupal/rootfs/etc/cont-init.d/99-custom-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion matomo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 && \
Expand Down
14 changes: 9 additions & 5 deletions solr/Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
6 changes: 3 additions & 3 deletions solr/README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down Expand Up @@ -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/
1 change: 1 addition & 0 deletions solr/rootfs/etc/cont-init.d/02-solr-setup.sh
Original file line number Diff line number Diff line change
@@ -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/
Expand Down