forked from volkszaehler/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.rpi
43 lines (30 loc) · 972 Bytes
/
Dockerfile.rpi
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
FROM resin/rpi-raspbian:stretch
MAINTAINER Andreas Goetz <[email protected]>
ARG SOURCE=src
ARG TARGET=/volkszaehler
ARG PHP_VER=7.0
# install runtime environment
RUN apt-get -q update \
&& apt-get -qy --no-install-recommends install \
php${PHP_VER}-cgi \
php${PHP_VER}-opcache \
php${PHP_VER}-mysql \
php${PHP_VER}-xml \
php${PHP_VER}-zip \
php${PHP_VER}-mbstring \
netcat \
&& rm -rf /var/lib/apt/lists/*
# configure environment
RUN sed -i "s/^.*opcache.enable_cli=.*/opcache.enable_cli=1/" /etc/php/${PHP_VER}/cli/php.ini
RUN sed -i "s/^.*opcache.enable=.*/opcache.enable=1/" /etc/php/${PHP_VER}/cgi/php.ini
RUN sed -i -re 's/^.*(disable_functions.*)/;\1/' /etc/php/${PHP_VER}/cgi/php.ini
# copy sources
COPY dist ${TARGET}
# configure options
COPY ${SOURCE}/bootstrap.sh /
COPY ${SOURCE}/volkszaehler.conf.php ${TARGET}/etc
COPY ${SOURCE}/options.js ${TARGET}/htdocs/js
# runtime
ENTRYPOINT ["tini", "--"]
WORKDIR ${TARGET}
CMD /bootstrap.sh