Skip to content

Commit 79e4e8c

Browse files
committed
Switch to SSL and add SHA1 checking
1 parent 1460102 commit 79e4e8c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ VOLUME /var/www/html
1414

1515
ENV WORDPRESS_VERSION 4.0.0
1616
ENV WORDPRESS_UPSTREAM_VERSION 4.0
17+
ENV WORDPRESS_SHA1 73449bbc015e3d1858f13f56f3289202bd756654
1718

1819
# upstream tarballs include ./wordpress/ so this gives us /usr/src/wordpress
19-
RUN curl -SL http://wordpress.org/wordpress-${WORDPRESS_UPSTREAM_VERSION}.tar.gz | tar -xzC /usr/src/
20+
RUN curl -o wordpress.tar.gz -SL https://wordpress.org/wordpress-${WORDPRESS_UPSTREAM_VERSION}.tar.gz \
21+
&& echo "$WORDPRESS_SHA1 *wordpress.tar.gz" | sha1sum -c - \
22+
&& tar -xzf wordpress.tar.gz -C /usr/src/ \
23+
&& rm wordpress.tar.gz
2024

2125
COPY docker-entrypoint.sh /entrypoint.sh
2226

update.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ if [[ "$current" != *.*.* ]]; then
99
current+='.0'
1010
fi
1111

12+
sha1="$(curl -sSL "https://wordpress.org/wordpress-$upstream.tar.gz.sha1")"
13+
1214
set -x
1315
sed -ri '
1416
s/^(ENV WORDPRESS_VERSION) .*/\1 '"$current"'/;
1517
s/^(ENV WORDPRESS_UPSTREAM_VERSION) .*/\1 '"$upstream"'/;
18+
s/^(ENV WORDPRESS_SHA1) .*/\1 '"$sha1"'/;
1619
' Dockerfile

0 commit comments

Comments
 (0)