Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelgbanks committed Aug 31, 2022
1 parent 5121281 commit b58be19
Show file tree
Hide file tree
Showing 20 changed files with 81 additions and 79 deletions.
2 changes: 1 addition & 1 deletion abuild/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM ${repository}/download:${tag} AS download
FROM alpine:${alpine} AS cache
FROM alpine:${alpine}
Expand Down
2 changes: 1 addition & 1 deletion base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM ${repository}/download:${tag} AS download
FROM alpine:${alpine} AS cache
FROM alpine:${alpine}
Expand Down
2 changes: 1 addition & 1 deletion cantaloupe/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download

RUN --mount=type=cache,id=cantaloupe-downloads,sharing=locked,target=/opt/downloads \
Expand Down
4 changes: 2 additions & 2 deletions code-server/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM alpine:${alpine} AS cache
FROM node:fermium-alpine3.15 as node
FROM ${repository}/abuild:${tag} AS build
Expand Down Expand Up @@ -89,7 +89,7 @@ RUN sed -i "/nginx:x:100:101:nginx:\/var\/lib\/nginx:\/sbin\/nologin/cnginx:x:10
RUN --mount=type=cache,id=code-server-drupal-apk,sharing=locked,from=cache,target=/var/cache/apk \
apk --update add \
htop \
php7-pecl-xdebug \
php81-pecl-xdebug \
spdlog \
sudo \
unison \
Expand Down
55 changes: 28 additions & 27 deletions composer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download

# https://getcomposer.org/download/
RUN --mount=type=cache,id=download-downloads,sharing=locked,target=/opt/downloads \
COMPOSER_VERSION="2.0.12" && \
COMPOSER_VERSION="2.3.10" && \
COMPOSER_FILE="composer.phar" && \
COMPOSER_URL="https://getcomposer.org/download/${COMPOSER_VERSION}/${COMPOSER_FILE}" && \
COMPOSER_SHA256="82ea8c1537cfaceb7e56f6004c7ccdf99ddafce7237c07374d920e635730a631" && \
COMPOSER_SHA256="d808272f284fa8e0f8b470703e1438ac8f362030bbc9d12e29530277d767aff0" && \
download.sh --url "${COMPOSER_URL}" --sha256 "${COMPOSER_SHA256}" "${DOWNLOAD_CACHE_DIRECTORY}" && \
cp "${DOWNLOAD_CACHE_DIRECTORY}/${COMPOSER_FILE}" /usr/bin/composer && \
chmod a+x /usr/bin/composer
Expand All @@ -20,31 +20,32 @@ FROM ${repository}/download:${tag}
# Install packages and tools that allow for basic downloads.
RUN --mount=type=cache,id=composer-apk,sharing=locked,from=cache,target=/var/cache/apk \
apk add --no-cache \
php7 \
php7-ctype \
php7-curl \
php7-dom \
php7-fileinfo \
php7-fpm \
php7-gd \
php7-iconv \
php7-json \
php7-mbstring \
php7-mysqli \
php7-opcache \
php7-openssl \
php7-pdo \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-phar \
php7-session \
php7-simplexml \
php7-tokenizer \
php7-xml \
php7-xmlwriter \
php7-xmlreader \
php7-xsl \
php81 \
php81-ctype \
php81-curl \
php81-dom \
php81-fileinfo \
php81-fpm \
php81-gd \
php81-iconv \
php81-json \
php81-mbstring \
php81-mysqli \
php81-opcache \
php81-openssl \
php81-pdo \
php81-pdo_mysql \
php81-pdo_pgsql \
php81-phar \
php81-session \
php81-simplexml \
php81-tokenizer \
php81-xml \
php81-xmlwriter \
php81-xmlreader \
php81-xsl \
&& \
ln -s /usr/bin/php81 /usr/bin/php && \
echo '' > /root/.ash_history

COPY --from=download /usr/bin/composer /usr/bin/composer
Expand Down
4 changes: 2 additions & 2 deletions crayfish/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ ARG repository=local
ARG tag=latest
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download

ARG COMMIT=2.0.0
ARG COMMIT=709b51446fe897af76695b32ab689ecf4bab7aeb

RUN --mount=type=cache,id=crayfish-downloads,sharing=locked,target=/opt/downloads \
git-clone-cached.sh \
--url https://github.com/Islandora/Crayfish.git \
--url https://github.com/nigelgbanks/Crayfish.git \
--cache-dir "${DOWNLOAD_CACHE_DIRECTORY}" \
--commit "${COMMIT}" \
--worktree /var/www/crayfish
Expand Down
4 changes: 2 additions & 2 deletions crayfits/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ ARG repository=local
ARG tag=latest
FROM --platform=$BUILDPLATFORM ${repository}/composer:${tag} AS composer

ARG COMMIT=6e95f2f325c910b254a2b7bd1cedf25b17874d30
ARG COMMIT=a7ed65283912846eff76adfcc4ec14c93e5b611c

RUN --mount=type=cache,id=crayfits-downloads,sharing=locked,target=/opt/downloads \
--mount=type=cache,id=crayfish-composer,sharing=locked,target=/root/.composer/cache \
git-clone-cached.sh \
--url https://github.com/roblib/CrayFits.git \
--url https://github.com/nigelgbanks/CrayFits.git \
--cache-dir "${DOWNLOAD_CACHE_DIRECTORY}" \
--commit "${COMMIT}" \
--worktree /var/www/crayfits && \
Expand Down
2 changes: 1 addition & 1 deletion download/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax=docker/dockerfile:1.2.1
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM alpine:${alpine} AS cache
FROM alpine:${alpine}

Expand Down
2 changes: 1 addition & 1 deletion drupal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download

RUN --mount=type=cache,id=drupal-downloads,sharing=locked,target=/opt/downloads \
Expand Down
2 changes: 1 addition & 1 deletion fcrepo6/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:experimental
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download

RUN --mount=type=cache,id=fcrepo6-downloads,sharing=locked,target=/opt/downloads \
Expand Down
2 changes: 1 addition & 1 deletion fits/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/download:${tag} AS download

RUN --mount=type=cache,id=fits-downloads,sharing=locked,target=/opt/downloads \
Expand Down
2 changes: 1 addition & 1 deletion homarus/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/crayfish:${tag} AS crayfish

RUN --mount=type=cache,id=homarus-composer,sharing=locked,target=/root/.composer/cache \
Expand Down
2 changes: 1 addition & 1 deletion hypercube/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/crayfish:${tag} AS crayfish

RUN --mount=type=cache,id=hypercube-composer,sharing=locked,target=/root/.composer/cache \
Expand Down
2 changes: 1 addition & 1 deletion imagemagick/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM alpine:${alpine} AS cache
FROM ${repository}/abuild:${tag} AS build

Expand Down
2 changes: 1 addition & 1 deletion java/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM alpine:${alpine} AS cache
FROM ${repository}/base:${tag}

Expand Down
2 changes: 1 addition & 1 deletion mariadb/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM alpine:${alpine} AS cache
FROM ${repository}/base:${tag}

Expand Down
57 changes: 29 additions & 28 deletions nginx/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,42 +1,43 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM alpine:${alpine} AS cache
FROM --platform=$BUILDPLATFORM ${repository}/composer:${tag} AS composer
FROM ${repository}/base:${tag}

RUN --mount=type=cache,id=nginx-apk,sharing=locked,from=cache,target=/var/cache/apk \
apk add \
nginx \
php7 \
php7-ctype \
php7-curl \
php7-dom \
php7-fileinfo \
php7-fpm \
php7-gd \
php7-iconv \
php7-intl \
php7-json \
php7-ldap \
php7-mbstring \
php7-mysqli \
php7-opcache \
php7-openssl \
php7-pdo \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-phar \
php7-session \
php7-simplexml \
php7-tokenizer \
php7-xml \
php7-xmlreader \
php7-xmlwriter \
php7-xsl \
php7-zip \
php81 \
php81-ctype \
php81-curl \
php81-dom \
php81-fileinfo \
php81-fpm \
php81-gd \
php81-iconv \
php81-intl \
php81-json \
php81-ldap \
php81-mbstring \
php81-mysqli \
php81-opcache \
php81-openssl \
php81-pdo \
php81-pdo_mysql \
php81-pdo_pgsql \
php81-phar \
php81-session \
php81-simplexml \
php81-tokenizer \
php81-xml \
php81-xmlreader \
php81-xmlwriter \
php81-xsl \
php81-zip \
&& \
ln -s /usr/bin/php81 /usr/bin/php && \
cleanup.sh

ENV \
Expand Down
2 changes: 1 addition & 1 deletion postgresql/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM alpine:${alpine} AS cache
FROM ${repository}/base:${tag}

Expand Down
8 changes: 4 additions & 4 deletions riprap/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/composer:${tag} AS composer

RUN --mount=type=cache,id=riprap-composer,sharing=locked,target=/root/.composer/cache \
--mount=type=cache,id=riprap-downloads,sharing=locked,target=/opt/downloads \
COMMIT=7d7cae2d09dec20caa3c3f5752434af32401819e && \
COMMIT=b84ac14370d0ffa156542e387a8eff9104b8858b && \
git-clone-cached.sh \
--url https://github.com/mjordan/riprap.git \
--url https://github.com/nigelgbanks/riprap.git \
--cache-dir "${DOWNLOAD_CACHE_DIRECTORY}" \
--commit "${COMMIT}" \
--worktree /var/www/riprap && \
Expand All @@ -20,7 +20,7 @@ FROM ${repository}/nginx:${tag}
EXPOSE 8000

RUN --mount=type=cache,id=riprap-apk,sharing=locked,from=cache,target=/var/cache/apk \
apk add php7-pdo_sqlite && \
apk add php81-pdo_sqlite && \
cleanup.sh

# The driver is given explicitly as Rip Rap can be run on SQLite without
Expand Down
2 changes: 1 addition & 1 deletion tomcat/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# syntax=docker/dockerfile:1.2.1
ARG repository=local
ARG tag=latest
ARG alpine=3.15.0
ARG alpine=3.16.1
FROM --platform=$BUILDPLATFORM ${repository}/java:${tag} AS download

RUN --mount=type=cache,id=tomcat-downloads,sharing=locked,target=/opt/downloads \
Expand Down

0 comments on commit b58be19

Please sign in to comment.