Skip to content

Commit

Permalink
Use archive instead of git repository when building WordPress
Browse files Browse the repository at this point in the history
  • Loading branch information
rinatkhaziev committed Dec 17, 2024
1 parent 0c237c2 commit ea535d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dev-tools/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ export XDEBUG_MODE=off

subdomain=0

echo -e "Welcome to the WordPress VIP! Setting things up..."

# Check if the first argument starts with '--'
if [ "${1#--}" != "$1" ]; then
if [ $# -lt 8 ]; then
Expand Down
4 changes: 2 additions & 2 deletions wordpress/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# syntax=docker/dockerfile:1.7
FROM --platform=$BUILDPLATFORM scratch AS build
ARG WP_GIT_REF
ADD https://github.com/WordPress/WordPress.git#${WP_GIT_REF} /wp
ADD https://github.com/WordPress/WordPress/archive/refs/tags/${WP_GIT_REF}.tar.gz /wp/
COPY extra/ /wp/

FROM ghcr.io/automattic/vip-container-images/helpers:v1@sha256:bc2beca042ce7c47e2b737920c77248f4a6c25cc7e137bf9de6944af8a68701c AS helpers
FROM busybox:stable-musl@sha256:b4771ab006a5344931341972e1e4b1ff14db2c327eeab0053416aa2277213b1d
COPY --from=build --link /wp /wp
COPY --from=build --link --chown=1000:1000 /wp /wp
COPY --from=helpers /rsync /usr/bin/rsync

0 comments on commit ea535d5

Please sign in to comment.