Skip to content

Commit 5fc26bc

Browse files
navossocSaraSmiseth
authored andcommitted
Just a rewrite...
1 parent bc33744 commit 5fc26bc

1 file changed

Lines changed: 24 additions & 26 deletions

File tree

Dockerfile

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,34 @@
11
FROM alpine:3.12
22

33
LABEL description="PostfixAdmin is a web based interface used to manage mailboxes" \
4-
maintainer="Hardware <contact@meshup.net>"
4+
maintainer="Hardware <contact@meshup.net>"
55

66
ARG VERSION=3.2.4
77
ARG SHA256_HASH="f61a64b32052c46f40cba466e5e384de0efab8c343c91569bcc5ebfd3694811e"
88

9-
RUN echo "@community https://nl.alpinelinux.org/alpine/v3.12/community" >> /etc/apk/repositories \
10-
&& apk -U upgrade \
11-
&& apk add -t build-dependencies \
12-
ca-certificates \
13-
gnupg \
14-
&& apk add \
15-
su-exec \
16-
dovecot \
17-
tini@community \
18-
php7@community \
19-
php7-phar \
20-
php7-fpm@community \
21-
php7-imap@community \
22-
php7-pgsql@community \
23-
php7-mysqli@community \
24-
php7-session@community \
25-
php7-mbstring@community \
26-
&& cd /tmp \
27-
&& PFA_TARBALL="postfixadmin-${VERSION}.tar.gz" \
28-
&& wget -q https://github.com/postfixadmin/postfixadmin/archive/${PFA_TARBALL} \
29-
&& CHECKSUM=$(sha256sum ${PFA_TARBALL} | awk '{print $1}') \
30-
&& if [ "${CHECKSUM}" != "${SHA256_HASH}" ]; then echo "ERROR: Checksum does not match!" && exit 1; fi \
31-
&& mkdir /postfixadmin && tar xzf ${PFA_TARBALL} -C /postfixadmin && mv /postfixadmin/postfixadmin-postfixadmin-$VERSION/* /postfixadmin \
32-
&& apk del build-dependencies \
33-
&& rm -rf /var/cache/apk/* /tmp/* /root/.gnupg /postfixadmin/postfixadmin-$VERSION*
9+
RUN set -eux; \
10+
apk add --no-cache \
11+
su-exec \
12+
dovecot \
13+
tini \
14+
\
15+
php7 \
16+
php7-fpm \
17+
php7-imap \
18+
php7-mbstring \
19+
php7-mysqli \
20+
php7-pgsql \
21+
php7-phar \
22+
php7-session \
23+
; \
24+
\
25+
PFA_TARBALL="postfixadmin-${VERSION}.tar.gz"; \
26+
wget -q https://github.com/postfixadmin/postfixadmin/archive/${PFA_TARBALL}; \
27+
echo "${SHA256_HASH} *${PFA_TARBALL}" | sha256sum -c; \
28+
\
29+
mkdir /postfixadmin; \
30+
tar -xzf ${PFA_TARBALL} --strip-components=1 -C /postfixadmin; \
31+
rm -f ${PFA_TARBALL}
3432

3533
COPY bin /usr/local/bin
3634
RUN chmod +x /usr/local/bin/*

0 commit comments

Comments
 (0)