-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (28 loc) · 976 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
39
#
# Builder
#
FROM abiosoft/caddy:builder as builder
ARG version="0.10.10"
ARG plugins="git"
RUN VERSION=${version} PLUGINS=${plugins} /bin/sh /usr/bin/builder.sh
#
# Final stage
#
FROM php:fpm-alpine3.7
RUN apk upgrade --update && apk add git libpng-dev freetype-dev libjpeg-turbo-dev \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure zip \
&& docker-php-ext-install gd zip
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php --install-dir=/usr/local/bin --filename=composer && \
php -r "unlink('composer-setup.php');" && \
chmod +x /usr/local/bin/composer
# install caddy
COPY --from=builder /install/caddy /usr/sbin/caddy
# validate install
RUN /usr/sbin/caddy -version
RUN /usr/sbin/caddy -plugins
EXPOSE 80 443 2015 9000
WORKDIR /srv
ENTRYPOINT ["/usr/sbin/caddy"]
CMD ["--conf", "/etc/Caddyfile", "--log", "stdout"]