forked from crazy-max/docker-nextcloud
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-12
123 lines (113 loc) · 3.29 KB
/
Dockerfile-12
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
FROM alpine:3.7
ARG BUILD_DATE
ARG VCS_REF
ARG VERSION
LABEL maintainer="CrazyMax" \
org.label-schema.build-date=$BUILD_DATE \
org.label-schema.name="nextcloud" \
org.label-schema.description="Nextcloud" \
org.label-schema.version=$VERSION \
org.label-schema.url="https://github.com/crazy-max/docker-nextcloud" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/crazy-max/docker-nextcloud" \
org.label-schema.vendor="CrazyMax" \
org.label-schema.schema-version="1.0"
RUN apk --update --no-cache add \
bash \
ca-certificates \
curl \
ffmpeg \
libressl \
libsmbclient \
libxml2 \
nginx \
php7 \
php7-apcu \
php7-bz2 \
php7-cli \
php7-ctype \
php7-curl \
php7-dom \
php7-exif \
php7-fileinfo \
php7-fpm \
php7-ftp \
php7-gd \
php7-gmp \
php7-iconv \
php7-imagick \
php7-intl \
php7-json \
php7-ldap \
php7-mbstring \
php7-mcrypt \
php7-memcached \
php7-opcache \
php7-openssl \
php7-pcntl \
php7-pdo \
php7-pdo_mysql \
php7-pdo_pgsql \
php7-pdo_sqlite \
php7-posix \
php7-redis \
php7-session \
php7-simplexml \
php7-sqlite3 \
php7-xml \
php7-xmlreader \
php7-xmlwriter \
php7-zip \
php7-zlib \
python3 \
su-exec \
tzdata \
&& apk --update --no-cache add -t build-dependencies \
autoconf \
automake \
build-base \
libtool \
pcre-dev \
php7-dev \
php7-pear \
samba-dev \
tar \
wget \
&& cd /tmp \
&& wget -q https://pecl.php.net/get/smbclient-1.0.0.tgz \
&& pecl install smbclient-1.0.0.tgz \
&& wget -q "https://github.com/just-containers/s6-overlay/releases/latest/download/s6-overlay-amd64.tar.gz" -qO "/tmp/s6-overlay-amd64.tar.gz" \
&& tar xzf /tmp/s6-overlay-amd64.tar.gz -C / \
&& apk del build-dependencies \
&& rm -rf /tmp/* /var/cache/apk/* /var/www/*
ENV NEXTCLOUD_VERSION="12.0.13" \
TZ="UTC" \
PUID="1000" \
PGID="1000" \
S6_BEHAVIOUR_IF_STAGE2_FAILS="2"
RUN apk --update --no-cache add -t build-dependencies \
gnupg \
&& pip3 install --upgrade pip \
&& pip3 install nextcloud_news_updater --install-option="--install-scripts=/usr/bin" \
&& cd /tmp \
&& curl -SsOL https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 \
&& curl -SsOL https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc \
&& curl -SsOL https://nextcloud.com/nextcloud.asc \
&& gpg --import nextcloud.asc \
&& gpg --verify --batch --no-tty nextcloud-${NEXTCLOUD_VERSION}.tar.bz2.asc nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 \
&& tar -xjf nextcloud-${NEXTCLOUD_VERSION}.tar.bz2 --strip 1 -C /var/www \
&& rm -f nextcloud-${NEXTCLOUD_VERSION}.tar* nextcloud.asc \
&& chown -R nobody.nogroup /var/www \
&& apk del build-dependencies \
&& rm -rf /root/.gnupg /tmp/* /var/cache/apk/* /var/www/updater
COPY rootfs /
RUN chmod a+x /usr/local/bin/* \
&& addgroup -g ${PGID} nextcloud \
&& adduser -D -h /home/nextcloud -u ${PUID} -G nextcloud -s /bin/sh nextcloud \
&& mkdir -p /data /var/run/nginx /var/run/php-fpm
EXPOSE 8000
WORKDIR /var/www
VOLUME [ "/data" ]
ENTRYPOINT [ "/init" ]
HEALTHCHECK --interval=10s --timeout=5s --start-period=20s \
CMD /usr/local/bin/healthcheck