38 lines
1.5 KiB
Docker
38 lines
1.5 KiB
Docker
FROM drupal:9.5.0-php8.1-apache-bullseye
|
|
|
|
# RUN apk add --no-cache git
|
|
RUN apt update; \
|
|
apt install -y --no-install-recommends git wget; \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
RUN set -eux; \
|
|
rm -rf /opt/drupal/
|
|
|
|
WORKDIR /opt/drupal
|
|
|
|
# NOTE(3wc): drutopia/drutopia_template currently references out-of-date URLs,
|
|
# so we download composer.{json,lock} from drutopia_platform/build_source
|
|
# instead.
|
|
#
|
|
# additionally, gitlab doesn't support cloning anonymously over SSH (maybe they
|
|
# can pick up more work with border cops to be able to implement that 5-year-old "feature
|
|
# request"[0] 🙄) so we need to switch to HTTPS URIs; in theory we could do this
|
|
# selectively for gitlab, but doing it across the board means not needing to run
|
|
# ssh-keyscan, or install an SSH client in the image.
|
|
#
|
|
# [0]: https://gitlab.com/gitlab-org/gitlab/-/issues/24108
|
|
RUN set -eux; \
|
|
export COMPOSER_HOME="$(mktemp -d)"; \
|
|
wget https://gitlab.com/drutopia-platform/build_source/-/raw/master/composer.json; \
|
|
wget https://gitlab.com/drutopia-platform/build_source/-/raw/master/composer.lock; \
|
|
sed -i 's,git@\([^:]*\):,https://\1/,g' composer.json; \
|
|
sed -i 's,git@\([^:]*\):,https://\1/,g' composer.lock; \
|
|
composer install; \
|
|
rm -rf "$COMPOSER_HOME"; \
|
|
chown -R www-data:www-data web/sites web/modules web/themes
|
|
|
|
WORKDIR /opt/drupal/web
|
|
|
|
# composer create-project drutopia/drutopia_template:dev-master --no-interaction ./; \
|
|
# composer-pin-apply web/profiles/contrib/drutopia/bin/drutopia-tested-global-pinnings.sh; \
|