Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1018 Bytes

Dockerfile.mediawiki

File metadata and controls

24 lines (19 loc) · 1018 Bytes

FROM docker-registry.wikimedia.org/dev/buster-php74-fpm:1.0.0-s3

  1. IMPORTANT: Any local dependency that `setupRepos.sh` needs MUST have a `COPY`
  2. statement here before `setupRepos.sh` is executed. We copy individual files
  3. instead of copying the entire `src` directory so that Docker's build cache
  4. isn't unnecessarily busted each time a file in the `src` directory changes.
  5. See: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache
COPY node-preparation.sh /node-preparation.sh COPY src/SimpleSpawn.js /src/SimpleSpawn.js COPY src/setupRepos.sh /src/setupRepos.sh COPY repositories.json /repositories.json

ARG CLONE_DEPTH ENV CLONE_DEPTH=$CLONE_DEPTH

WORKDIR /var/www/html/w

RUN /node-preparation.sh ensure_node_major_version_installed 18 || \

    (echo "Failed to install Node" && exit 1) && \
    git config --global user.email "app@example.com" && \
    git config --global user.name "app" && \
    /src/setupRepos.sh "$( cat /repositories.json )"

COPY src /src