forked from phpmyadmin/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (31 loc) · 1.17 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
FROM alpine:latest
# Install dependencies
RUN apk add --no-cache php5-mysqli php5-ctype php5-xml php5-gd php5-zlib php5-bz2 php5-zip php5-openssl php5-curl php5-opcache php5-json nginx php5-fpm supervisor
# Include keyring to verify download
COPY phpmyadmin.keyring /
# Calculate download URL
ENV VERSION 4.0.10.17
ENV URL https://files.phpmyadmin.net/phpMyAdmin/${VERSION}/phpMyAdmin-${VERSION}-all-languages.tar.gz
# Download tarball, verify it using gpg and extract
RUN set -x \
&& export GNUPGHOME="$(mktemp -d)" \
&& apk add --no-cache curl gnupg \
&& curl --output phpMyAdmin.tar.gz --location $URL \
&& apk del --no-cache curl gnupg \
&& rm -rf "$GNUPGHOME" \
&& tar xzf phpMyAdmin.tar.gz \
&& rm -f phpMyAdmin.tar.gz \
&& mv phpMyAdmin* /www \
&& rm -rf /www/js/jquery/src/ /www/js/openlayers/src/ /www/setup/ /www/sql/ /www/examples/ /www/test/ /www/po/
# Copy configuration
COPY config.inc.php /www/
COPY etc /etc/
# Copy main script
COPY run.sh /run.sh
RUN chmod u+rwx /run.sh
# Add volume for sessions to allow session persistence
VOLUME /sessions
# We expose phpMyAdmin on port 80
EXPOSE 80
ENTRYPOINT [ "/run.sh" ]
CMD ["phpmyadmin"]