Skip to content

Commit

Permalink
Merge pull request #6 from linuxserver/tidy_up
Browse files Browse the repository at this point in the history
some tidying and stuff
  • Loading branch information
sparklyballs authored Aug 2, 2018
2 parents 7500e19 + 819404a commit a3bddfc
Show file tree
Hide file tree
Showing 6 changed files with 182 additions and 197 deletions.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!--- Provide a general summary of the issue in the Title above -->

[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]


<!--- If you have an issue with the project, please provide us with the following information -->

<!--- Host OS -->
<!--- Command line users, your run/create command, GUI/Unraid users, a screenshot of your template settings. -->
<!--- Docker log output, docker log <container-name> -->
<!--- Mention if you're using symlinks on any of the volume mounts. -->


<!--- If you have a suggestion or fix for the project, please provide us with the following information -->

<!--- What you think your suggestion brings to the project, or fixes with the project -->
<!--- If it's a fix, would it be better suited as a Pull request to the repo ? -->

## Thanks, team linuxserver.io

15 changes: 15 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--- Provide a general summary of your changes in the Title above -->

[linuxserverurl]: https://linuxserver.io
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]


<!--- Before submitting a pull request please check the following -->

<!--- That you have made a branch in your fork, we'd rather not merge from your master -->
<!--- That if the PR is addressing an existing issue include, closes #<issue number> , in the body of the PR commit message -->
<!--- You have included links to any files / patches etc your PR may be using in the body of the PR commit message -->
<!--- -->

## Thanks, team linuxserver.io

109 changes: 47 additions & 62 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,75 +1,60 @@
# using ideas/code from other sparklyballs templates
# set variable to get archive based on github api data (sparklyballs heimdall inspiration)

FROM lsiobase/alpine.nginx.arm64:3.7

# Add qemu to build on x86_64 systems
COPY qemu-aarch64-static /usr/bin

# set version label
ARG BUILD_DATE
ARG VERSION
ARG BOOKSTACK_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="homerr"

# install packages
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
curl \
php7-openssl \
php7-pdo_mysql \
php7-mbstring \
php7-tidy \
php7-phar \
php7-dom \
php7-tokenizer \
php7-gd \
php7-mysqlnd \
php7-tidy \
php7-simplexml \
php7-ctype \
tar && \

echo "**** configure php-fpm to pass env vars ****" && \
sed -i \
's/;clear_env = no/clear_env = no/g' \
/etc/php7/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \

echo "**** get bookstack ****" && \

mkdir -p\
/var/www/html && \

if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \

curl -o \
/tmp/bookstack.tar.gz -L \
"https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \

tar xf \
/tmp/bookstack.tar.gz -C \
/var/www/html/ --strip-components=1 && \

cp /var/www/html/.env.example /var/www/html/.env && \

echo "**** get composer ****" && \

cd /tmp && \
curl -sS https://getcomposer.org/installer | php && \
mv /tmp/composer.phar /usr/local/bin/composer && \

echo "**** run composer install ****" && \

composer install -d /var/www/html/ && \
# package versions
ARG BOOKSTACK_RELEASE

echo "**** cleanup ****" && \
rm -rf \
/root/.composer \
/tmp/*
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-dom \
php7-gd \
php7-mbstring \
php7-mysqlnd \
php7-openssl \
php7-pdo_mysql \
php7-phar \
php7-simplexml \
php7-tidy \
php7-tokenizer \
tar && \
echo "**** configure php-fpm ****" && \
sed -i 's/;clear_env = no/clear_env = no/g' /etc/php7/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
echo "**** fetch bookstack ****" && \
mkdir -p\
/var/www/html && \
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/bookstack.tar.gz -L \
"https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \
tar xf \
/tmp/bookstack.tar.gz -C \
/var/www/html/ --strip-components=1 && \
cp /var/www/html/.env.example /var/www/html/.env && \
echo "**** install composer ****" && \
cd /tmp && \
curl -sS https://getcomposer.org/installer | php && \
mv /tmp/composer.phar /usr/local/bin/composer && \
echo "**** install composer dependencies ****" && \
composer install -d /var/www/html/ && \
echo "**** cleanup ****" && \
rm -rf \
/root/.composer \
/tmp/*

# copy local files
COPY root/ /
Expand Down
105 changes: 45 additions & 60 deletions Dockerfile.amd64
Original file line number Diff line number Diff line change
@@ -1,72 +1,57 @@
# using ideas/code from other thelamer & sparklyballs lsio templates
FROM lsiobase/alpine.nginx:3.7

# set version label
ARG BUILD_DATE
ARG VERSION
ARG BOOKSTACK_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="homerr"

# install packages
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
curl \
php7-openssl \
php7-pdo_mysql \
php7-mbstring \
php7-tidy \
php7-phar \
php7-dom \
php7-tokenizer \
php7-gd \
php7-mysqlnd \
php7-tidy \
php7-simplexml \
php7-ctype \
tar && \

echo "**** configure php-fpm to pass env vars ****" && \
sed -i \
's/;clear_env = no/clear_env = no/g' \
/etc/php7/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \

echo "**** get bookstack ****" && \

mkdir -p\
/var/www/html && \

if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \

curl -o \
/tmp/bookstack.tar.gz -L \
"https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \

tar xf \
/tmp/bookstack.tar.gz -C \
/var/www/html/ --strip-components=1 && \

cp /var/www/html/.env.example /var/www/html/.env && \

echo "**** get composer ****" && \

cd /tmp && \
curl -sS https://getcomposer.org/installer | php && \
mv /tmp/composer.phar /usr/local/bin/composer && \

echo "**** run composer install ****" && \

composer install -d /var/www/html/ && \
# package versions
ARG BOOKSTACK_RELEASE

echo "**** cleanup ****" && \
rm -rf \
/root/.composer \
/tmp/*
RUN \
echo "**** install build packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-dom \
php7-gd \
php7-mbstring \
php7-mysqlnd \
php7-openssl \
php7-pdo_mysql \
php7-phar \
php7-simplexml \
php7-tidy \
php7-tokenizer \
tar && \
echo "**** configure php-fpm ****" && \
sed -i 's/;clear_env = no/clear_env = no/g' /etc/php7/php-fpm.d/www.conf && \
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php7/php-fpm.conf && \
echo "**** fetch bookstack ****" && \
mkdir -p\
/var/www/html && \
if [ -z ${BOOKSTACK_RELEASE+x} ]; then \
BOOKSTACK_RELEASE=$(curl -sX GET "https://api.github.com/repos/bookstackapp/bookstack/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/bookstack.tar.gz -L \
"https://github.com/BookStackApp/BookStack/archive/${BOOKSTACK_RELEASE}.tar.gz" && \
tar xf \
/tmp/bookstack.tar.gz -C \
/var/www/html/ --strip-components=1 && \
cp /var/www/html/.env.example /var/www/html/.env && \
echo "**** install composer ****" && \
cd /tmp && \
curl -sS https://getcomposer.org/installer | php && \
mv /tmp/composer.phar /usr/local/bin/composer && \
echo "**** install composer dependencies ****" && \
composer install -d /var/www/html/ && \
echo "**** cleanup ****" && \
rm -rf \
/root/.composer \
/tmp/*

# copy local files
COPY root/ /
Expand Down
Loading

0 comments on commit a3bddfc

Please sign in to comment.