Merge pull request #5 from linuxserver/alpine_3.5

Alpine 3.5
This commit is contained in:
j0nnymoe 2017-02-24 15:34:17 +00:00 committed by GitHub
commit 3f19ae5cab
7 changed files with 108 additions and 101 deletions

View file

@ -1,4 +1,4 @@
FROM linuxserver/baseimage.apache
FROM lsiobase/alpine.nginx:3.5
MAINTAINER sparklyballs
# set version label
@ -6,43 +6,62 @@ ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# copy sources.list
COPY sources.list /etc/apt/
# install build packages
RUN \
apk add --no-cache --virtual=build-dependencies \
autoconf \
curl \
file \
g++ \
gcc \
imagemagick-dev \
libtool \
make \
php7-dev && \
# set install packages as variable
ENV APTLIST="curl \
lynx-cur \
php5-cgi \
php5-gd \
php5-imagick \
php5-mysql \
php5-xmlrpc \
php5-xsl \
php5-apcu \
php-auth \
php-auth-sasl \
php-net-smtp \
php-pear \
unzip \
wget"
# install runtime packages
apk add --no-cache \
curl \
imagemagick \
lynx \
php7-apcu \
php7-cgi \
php7-gd \
php7-mysqlnd \
php7-pear \
php7-xmlrpc \
php7-xsl \
re2c \
unzip \
wget && \
# install php imagemagick
mkdir -p \
/tmp/imagick-src && \
curl -o \
/tmp/imagick.tgz -L \
https://pecl.php.net/get/imagick && \
tar xf \
/tmp/imagick.tgz -C \
/tmp/imagick-src --strip-components=1 && \
cd /tmp/imagick-src && \
phpize7 && \
./configure \
--prefix=/usr \
--with-php-config=/usr/bin/php-config7 && \
make && \
make install && \
echo "extension=imagick.so" > /etc/php7/conf.d/00_imagick.ini && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# install packages
RUN apt-get update && \
apt-get install $APTLIST -qy && \
# copy local files
COPY root/ /
# cleanup
apt-get clean -y && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# add some files
ADD defaults/ /defaults/
ADD init/ /etc/my_init.d/
RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh
# expose ports
# ports and volumes
EXPOSE 80 443
# set volumes
VOLUME /config /pictures

View file

@ -63,7 +63,7 @@ In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as bel
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....
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..
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..
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.
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
## Versions
+ **23.02.17:** Rebase to alpine linux 3.5 and nginx.
+ **14.10.16:** Add version layer information.
+ **10.09.16:** Add layer badges to README.
+ **29.08.15:** Initial Release.

View file

@ -1,13 +0,0 @@
<VirtualHost *:80>
DocumentRoot /config/www/gallery
<Directory /config/www/gallery/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order deny,allow
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

View file

@ -1,17 +0,0 @@
#!/bin/bash
mkdir -p /config/www/gallery
if [ -f "/config/www/gallery/index.php" ]; then
echo "using existing website"
else
echo "fetching piwigo files"
wget "http://piwigo.org/download/dlcounter.php?code=latest" -O /tmp/piwigo.zip
unzip -q /tmp/piwigo.zip -d /tmp
mv /tmp/piwigo/* /config/www/gallery
rm -rf /tmp/piwigo /tmp/piwigo.zip
chown -R abc:abc /config/www/gallery
fi
if [ ! -f "/config/www/gallery/local/config/config.inc.php" ]; then
cp /config/www/gallery/include/config_default.inc.php /config/www/gallery/local/config/config.inc.php
chown abc:abc /config/www/gallery/local/config/config.inc.php
fi

30
root/defaults/default Normal file
View file

@ -0,0 +1,30 @@
server {
listen 80 default_server;
listen 443 ssl;
root /config/www/gallery;
index index.html index.htm index.php;
server_name _;
ssl_certificate /config/keys/cert.crt;
ssl_certificate_key /config/keys/cert.key;
client_max_body_size 0;
location / {
try_files $uri $uri/ /index.html /index.php?$args =404;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# With php5-cgi alone:
fastcgi_pass 127.0.0.1:9000;
# With php5-fpm:
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}
}

View file

@ -0,0 +1,23 @@
#!/usr/bin/with-contenv bash
# make our folders
mkdir -p \
/config/www/gallery
# install piwigo
if [ ! -f "/config/www/gallery/index.php" ]; then
curl -o /tmp/piwigo.zip -L "http://piwigo.org/download/dlcounter.php?code=latest"
unzip -q /tmp/piwigo.zip -d /tmp
mv /tmp/piwigo/* /config/www/gallery
rm -rf /tmp/piwigo /tmp/piwigo.zip
fi
# copy config
[[ ! -f "/config/www/gallery/local/config/config.inc.php" ]] && \
cp /config/www/gallery/include/config_default.inc.php \
/config/www/gallery/local/config/config.inc.php
# permissions
chown -R abc:abc \
/config

View file

@ -1,36 +0,0 @@
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted
## Uncomment the following two lines to add software from the 'universe'
## repository.
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
# deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb http://archive.ubuntu.com/ubuntu/ trusty-security universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ trusty-security universe multiverse