File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,13 @@ VOLUME /var/www/html
14
14
15
15
ENV WORDPRESS_VERSION 4.0.0
16
16
ENV WORDPRESS_UPSTREAM_VERSION 4.0
17
+ ENV WORDPRESS_SHA1 73449bbc015e3d1858f13f56f3289202bd756654
17
18
18
19
# 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
20
24
21
25
COPY docker-entrypoint.sh /entrypoint.sh
22
26
Original file line number Diff line number Diff line change @@ -9,8 +9,11 @@ if [[ "$current" != *.*.* ]]; then
9
9
current+=' .0'
10
10
fi
11
11
12
+ sha1=" $( curl -sSL " https://wordpress.org/wordpress-$upstream .tar.gz.sha1" ) "
13
+
12
14
set -x
13
15
sed -ri '
14
16
s/^(ENV WORDPRESS_VERSION) .*/\1 ' " $current " ' /;
15
17
s/^(ENV WORDPRESS_UPSTREAM_VERSION) .*/\1 ' " $upstream " ' /;
18
+ s/^(ENV WORDPRESS_SHA1) .*/\1 ' " $sha1 " ' /;
16
19
' Dockerfile
You can’t perform that action at this time.
0 commit comments