-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
27 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,34 @@ | ||
FROM 10up/phpfpm | ||
FROM 10up/wp-php-fpm-dev:8.0-ubuntu AS builder | ||
|
||
ARG WPSNAPSHOTS_ARCHIVE | ||
ENV WPSNAPSHOTS_ARCHIVE $WPSNAPSHOTS_ARCHIVE | ||
|
||
USER root | ||
|
||
WORKDIR /opt/wpsnapshots | ||
|
||
RUN useradd wpsnapshots && \ | ||
mkdir -p /home/wpsnapshots && \ | ||
chown -R wpsnapshots:wpsnapshots /home/wpsnapshots && \ | ||
wget -q -c ${WPSNAPSHOTS_ARCHIVE} -O - | tar -xz --strip 1 && \ | ||
composer install --no-dev --no-progress && \ | ||
composer clear-cache && \ | ||
chown -R wpsnapshots:wpsnapshots /opt/wpsnapshots | ||
RUN \ | ||
useradd wpsnapshots && \ | ||
mkdir -p /home/wpsnapshots && \ | ||
chown -R wpsnapshots:wpsnapshots /home/wpsnapshots && \ | ||
wget -q -c ${WPSNAPSHOTS_ARCHIVE} -O - | tar -xz --strip 1 && \ | ||
composer install --no-dev --no-progress && \ | ||
composer clear-cache && \ | ||
chown -R wpsnapshots:wpsnapshots /opt/wpsnapshots | ||
|
||
FROM 10up/base-php:7.4-ubuntu | ||
|
||
USER root | ||
|
||
WORKDIR /opt/wpsnapshots | ||
|
||
COPY --from=builder --chown=wpsnapshots=wpsnapshots /opt/wpsnapshots /opt/wpsnapshots | ||
RUN \ | ||
apt-get update && apt-get install mariadb-client -y && apt-get clean all && \ | ||
useradd wpsnapshots && \ | ||
mkdir -p /home/wpsnapshots && \ | ||
chown -R wpsnapshots:wpsnapshots /home/wpsnapshots && \ | ||
chown -R wpsnapshots:wpsnapshots /opt/wpsnapshots | ||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT [ "/entrypoint.sh" ] | ||
ENTRYPOINT [ "/entrypoint.sh" ] |