Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
context: ./docker
file: ./docker/Dockerfile
tags: ${{ steps.prep.outputs.tags }}
platforms: linux/amd64,linux/arm64
build-args: |
WPSNAPSHOTS_ARCHIVE=${{ steps.prep.outputs.archive }}
labels: |
Expand Down
32 changes: 24 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
FROM 10up/phpfpm
FROM 10up/wp-php-fpm-dev:7.4-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 install mariadb-client -y && apt-get clean all && \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not build until I added apt-get update here. The mariadb-client package was not found.

Suggested change
apt-get install mariadb-client -y && apt-get clean all && \
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" ]