Skip to content

Commit 3f19ae5

Browse files
authored
Merge pull request #5 from linuxserver/alpine_3.5
Alpine 3.5
2 parents 605f0f3 + d9f6a3c commit 3f19ae5

7 files changed

Lines changed: 108 additions & 101 deletions

File tree

Dockerfile

Lines changed: 53 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,67 @@
1-
FROM linuxserver/baseimage.apache
1+
FROM lsiobase/alpine.nginx:3.5
22
MAINTAINER sparklyballs
33

44
# set version label
55
ARG BUILD_DATE
66
ARG VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88

9-
# copy sources.list
10-
COPY sources.list /etc/apt/
9+
# install build packages
10+
RUN \
11+
apk add --no-cache --virtual=build-dependencies \
12+
autoconf \
13+
curl \
14+
file \
15+
g++ \
16+
gcc \
17+
imagemagick-dev \
18+
libtool \
19+
make \
20+
php7-dev && \
1121

12-
# set install packages as variable
13-
ENV APTLIST="curl \
14-
lynx-cur \
15-
php5-cgi \
16-
php5-gd \
17-
php5-imagick \
18-
php5-mysql \
19-
php5-xmlrpc \
20-
php5-xsl \
21-
php5-apcu \
22-
php-auth \
23-
php-auth-sasl \
24-
php-net-smtp \
25-
php-pear \
26-
unzip \
27-
wget"
22+
# install runtime packages
23+
apk add --no-cache \
24+
curl \
25+
imagemagick \
26+
lynx \
27+
php7-apcu \
28+
php7-cgi \
29+
php7-gd \
30+
php7-mysqlnd \
31+
php7-pear \
32+
php7-xmlrpc \
33+
php7-xsl \
34+
re2c \
35+
unzip \
36+
wget && \
2837

38+
# install php imagemagick
39+
mkdir -p \
40+
/tmp/imagick-src && \
41+
curl -o \
42+
/tmp/imagick.tgz -L \
43+
https://pecl.php.net/get/imagick && \
44+
tar xf \
45+
/tmp/imagick.tgz -C \
46+
/tmp/imagick-src --strip-components=1 && \
47+
cd /tmp/imagick-src && \
48+
phpize7 && \
49+
./configure \
50+
--prefix=/usr \
51+
--with-php-config=/usr/bin/php-config7 && \
52+
make && \
53+
make install && \
54+
echo "extension=imagick.so" > /etc/php7/conf.d/00_imagick.ini && \
2955

56+
# cleanup
57+
apk del --purge \
58+
build-dependencies && \
59+
rm -rf \
60+
/tmp/*
3061

31-
# install packages
32-
RUN apt-get update && \
33-
apt-get install $APTLIST -qy && \
62+
# copy local files
63+
COPY root/ /
3464

35-
# cleanup
36-
apt-get clean -y && \
37-
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
38-
39-
# add some files
40-
ADD defaults/ /defaults/
41-
ADD init/ /etc/my_init.d/
42-
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
43-
44-
# expose ports
65+
# ports and volumes
4566
EXPOSE 80 443
46-
47-
# set volumes
4867
VOLUME /config /pictures

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
6363

6464
You must create a user and database for piwigo to use in a mysql/mariadb server. In the setup page for database, use the ip address rather than hostname....
6565

66-
A basic apache configuration file can be found in /config/apache/site-confs , edit the file to enable ssl (port 443 by default), set servername etc..
66+
A basic nginx configuration file can be found in /config/nginx/site-confs , edit the file to enable ssl (port 443 by default), set servername etc..
6767
Self-signed keys are generated the first time you run the container and can be found in /config/keys , if needed, you can replace them with your own.
6868

6969
The easiest way to edit the configuration file is to enable local files editor from the plugins page and use it to configure email settings etc....
@@ -84,6 +84,7 @@ The easiest way to edit the configuration file is to enable local files editor f
8484

8585
## Versions
8686

87+
+ **23.02.17:** Rebase to alpine linux 3.5 and nginx.
8788
+ **14.10.16:** Add version layer information.
8889
+ **10.09.16:** Add layer badges to README.
8990
+ **29.08.15:** Initial Release.

defaults/default.conf

Lines changed: 0 additions & 13 deletions
This file was deleted.

init/60_set_the_site.sh

Lines changed: 0 additions & 17 deletions
This file was deleted.

root/defaults/default

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
server {
2+
listen 80 default_server;
3+
4+
listen 443 ssl;
5+
6+
root /config/www/gallery;
7+
index index.html index.htm index.php;
8+
9+
server_name _;
10+
11+
ssl_certificate /config/keys/cert.crt;
12+
ssl_certificate_key /config/keys/cert.key;
13+
14+
client_max_body_size 0;
15+
16+
location / {
17+
try_files $uri $uri/ /index.html /index.php?$args =404;
18+
}
19+
20+
location ~ \.php$ {
21+
fastcgi_split_path_info ^(.+\.php)(/.+)$;
22+
# With php5-cgi alone:
23+
fastcgi_pass 127.0.0.1:9000;
24+
# With php5-fpm:
25+
#fastcgi_pass unix:/var/run/php5-fpm.sock;
26+
fastcgi_index index.php;
27+
include /etc/nginx/fastcgi_params;
28+
29+
}
30+
}

root/etc/cont-init.d/40-install

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
# make our folders
4+
mkdir -p \
5+
/config/www/gallery
6+
7+
# install piwigo
8+
if [ ! -f "/config/www/gallery/index.php" ]; then
9+
curl -o /tmp/piwigo.zip -L "http://piwigo.org/download/dlcounter.php?code=latest"
10+
unzip -q /tmp/piwigo.zip -d /tmp
11+
mv /tmp/piwigo/* /config/www/gallery
12+
rm -rf /tmp/piwigo /tmp/piwigo.zip
13+
fi
14+
15+
# copy config
16+
[[ ! -f "/config/www/gallery/local/config/config.inc.php" ]] && \
17+
cp /config/www/gallery/include/config_default.inc.php \
18+
/config/www/gallery/local/config/config.inc.php
19+
20+
# permissions
21+
chown -R abc:abc \
22+
/config
23+

sources.list

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)