FROM docker-registry.wikimedia.org/dev/buster-php81-fpm:1.0.1-s2
- IMPORTANT: Any local dependency that `setupRepos.sh` needs MUST have a `COPY`
- statement here before `setupRepos.sh` is executed. We copy individual files
- instead of copying the entire `src` directory so that Docker's build cache
- isn't unnecessarily busted each time a file in the `src` directory changes.
- See: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#leverage-build-cache
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