Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Zusel committed May 22, 2024
1 parent c81477b commit 85f2125
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion actionfiles/build_and_push_docker_image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1 +1,46 @@
FROM
FROM mediawiki:lts

# Define the MW_ROOT in MediaWiki as a variable name.
ENV MW_ROOT /var/www/html

# Make sure that existing software are updated and install development tools.
# The /etc/apt/preferences.d/no-debian-php is to ensure that we can install php-zip.
# We need php-zip so that Composer can install packages.
# TODO remove the /etc/apt/preferences.d/no-debian-php and apt-get -q install -y --no-install-recommends zip unzip php-zip once we upgrade to 1.36 because they are not necessary anymore.
RUN set -ex && \
apt-get -q update && apt-get upgrade -y && \
apt-get -q install -y --no-install-recommends nano vim ripgrep tig fd-find && \
rm /etc/apt/preferences.d/no-debian-php && \
apt-get -q install -y --no-install-recommends zip unzip php-zip && \
apt-get -q install -y --no-install-recommends mariadb-client && \
rm -rf /var/lib/apt/lists/* # Remove unnecessary apt cache to keep the layer small

# Define working directory for the following commands
WORKDIR ${MW_ROOT}

# Copy Tweeki skin to skins/
COPY ./skins/Tweeki skins/Tweeki

# Copy extensions
COPY ./extensions extensions

# Copy the php.ini with desired upload_max_filesize into the php directory.
COPY ./resources/php.ini /usr/local/etc/php/php.ini
# Copy more assets and composer file.
COPY ./resources/aqua.png resources/assets/aqua.png
COPY ./composer.local.json composer.local.json

# TODO hack to address https://github.com/inblockio/DataAccounting/issues/244.
# Remove this once MediaWiki has made a patch release.
RUN sed -i 's/$this->package->setProvides( \[ $link \] );/$this->package->setProvides( \[ self::MEDIAWIKI_PACKAGE_NAME => $link \] );/' ./includes/composer/ComposerPackageModifier.php

# Install the latest version of PHP package manager "Composer" and install
# MW-OAuth2Client from Git master.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin/ --filename=composer && \
composer update --no-dev && \
cd extensions && \
git clone https://github.com/rht/MW-OAuth2Client.git && \
cd MW-OAuth2Client && \
git submodule update --init && \
cd vendors/oauth2-client && \
composer install

0 comments on commit 85f2125

Please sign in to comment.