-
Notifications
You must be signed in to change notification settings - Fork 69
/
Dockerfile
48 lines (36 loc) · 1.78 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
41
42
43
44
45
46
47
48
FROM php:7.3-alpine
RUN echo "upload_max_filesize = 128M" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \
&& echo "post_max_size = 128M" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \
&& echo "memory_limit = 1G" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \
&& echo "max_execution_time = 600" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini \
&& echo "max_input_vars = 5000" >> /usr/local/etc/php/conf.d/0-upload_large_dumps.ini
STOPSIGNAL SIGINT
RUN addgroup -S adminer \
&& adduser -S -G adminer adminer \
&& mkdir -p /var/www/html \
&& mkdir -p /var/www/html/plugins-enabled \
&& chown -R adminer:adminer /var/www/html
WORKDIR /var/www/html
RUN apk add --no-cache libpq
RUN set -x \
&& apk add --no-cache --virtual .build-deps \
postgresql-dev \
sqlite-dev \
&& docker-php-ext-install pdo_mysql pdo_pgsql pdo_sqlite \
&& apk del .build-deps
COPY *.php /var/www/html/
ENV ADMINER_VERSION 4.7.3
ENV ADMINER_DOWNLOAD_SHA256 1ebfd69d1ae128cb85a05fbb4ff81af3253821a320e5a65a8a95fd31b14e899e
ENV ADMINER_SRC_DOWNLOAD_SHA256 b0c8a5a2a6a41b0bc4e147f8091f0ba3ee3245c71af0b7242043e59c617341da
RUN set -x \
&& curl -fsSL https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -o adminer.php \
&& echo "$ADMINER_DOWNLOAD_SHA256 adminer.php" |sha256sum -c - \
&& curl -fsSL https://github.com/vrana/adminer/archive/v$ADMINER_VERSION.tar.gz -o source.tar.gz \
&& echo "$ADMINER_SRC_DOWNLOAD_SHA256 source.tar.gz" |sha256sum -c - \
&& tar xzf source.tar.gz --strip-components=1 "adminer-$ADMINER_VERSION/designs/" "adminer-$ADMINER_VERSION/plugins/" \
&& rm source.tar.gz
COPY entrypoint.sh /usr/local/bin/
ENTRYPOINT [ "entrypoint.sh", "docker-php-entrypoint" ]
USER adminer
CMD [ "php", "-S", "[::]:8080", "-t", "/var/www/html" ]
EXPOSE 8080