-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (26 loc) · 858 Bytes
/
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
FROM ubuntu:18.04 as base
ENV DEBIAN_FRONTEND=noninteractive
# install required packages
RUN apt-get update && apt-get install -y software-properties-common curl git
# configure user
RUN add-apt-repository ppa:ondrej/php
RUN apt-get update && \
apt-get install -y \
php8.0-cli \
php8.0-zip \
php8.0-curl && \
php -r "readfile('http://getcomposer.org/installer');" | php -- --install-dir=/usr/bin/ --filename=composer && \
mkdir /run/php && \
apt-get -y autoremove && apt-get clean
RUN mkdir /app
# configure "crontab"
COPY schedule.sh /schedule.sh
RUN chmod +x /schedule.sh
from base as development
WORKDIR /app
ENTRYPOINT ["/schedule.sh"]
FROM base as production
RUN git clone https://github.com/knobik/shelly-plug-influxdb.git /app && \
composer install --no-dev -d /app
WORKDIR /app
ENTRYPOINT ["/schedule.sh"]