Skip to content

Commit 177d5cb

Browse files
authored
Merge pull request #43 from linuxserver/standard-base
Standard base
2 parents 25329e3 + 4343b24 commit 177d5cb

File tree

32 files changed

+222
-176
lines changed

32 files changed

+222
-176
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Comment on invalid interaction
2+
on:
3+
issues:
4+
types:
5+
- labeled
6+
jobs:
7+
add-comment-on-invalid:
8+
if: github.event.label.name == 'invalid'
9+
permissions:
10+
issues: write
11+
uses: linuxserver/github-workflows/.github/workflows/invalid-interaction-helper.yml@v1
12+
secrets: inherit

Dockerfile

+29-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.14
1+
# syntax=docker/dockerfile:1
2+
3+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.17
24

35
# set version label
46
ARG BUILD_DATE
@@ -7,30 +9,34 @@ ARG DISKOVER_RELEASE
79
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
810
LABEL maintainer="alex-phillips"
911

12+
# environment settings
13+
ENV DISKOVERDIR=/config/diskover.conf.d/diskover/
14+
1015
RUN \
1116
echo "**** install build packages ****" && \
1217
apk add --no-cache --virtual=build-dependencies \
1318
build-base \
14-
gcc \
15-
py3-pip \
16-
python3-dev \
19+
cargo \
1720
composer \
18-
curl \
1921
git \
20-
jq \
2122
nodejs \
22-
npm && \
23+
npm \
24+
python3-dev && \
2325
echo "**** install runtime packages ****" && \
24-
apk add --no-cache \
26+
apk add --no-cache \
2527
libldap \
2628
ncurses \
27-
php7-curl \
28-
php7-ldap \
29-
php7-sqlite3 \
29+
php81-curl \
30+
php81-ldap \
31+
php81-sqlite3 \
3032
py3-requests \
3133
py3-urllib3 \
3234
py3-xxhash \
3335
python3 && \
36+
echo "**** configure php-fpm to pass env vars ****" && \
37+
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \
38+
grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \
39+
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \
3440
echo "**** install diskover ****" && \
3541
if [ -z ${DISKOVER_RELEASE+x} ]; then \
3642
DISKOVER_RELEASE=$(curl -sX GET "https://api.github.com/repos/diskoverdata/diskover-community/releases" \
@@ -43,17 +49,22 @@ RUN \
4349
/tmp/diskover.tar.gz -C \
4450
/app/ --strip-components=1 && \
4551
cd /app/diskover && \
46-
pip3 install --no-cache-dir -r requirements.txt && \
47-
sed -i 's@;clear_env = no@clear_env = no@' "/etc/php7/php-fpm.d/www.conf" && \
48-
echo "**** overlay-fs workaround ****" && \
49-
mv /app/diskover /app/diskover-tmp && \
50-
mv /app/diskover-web /app/diskover-web-tmp && \
52+
python3 -m ensurepip && \
53+
pip3 install -U --no-cache-dir \
54+
pip \
55+
wheel && \
56+
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r requirements.txt && \
5157
echo "**** cleanup ****" && \
5258
apk del --purge \
5359
build-dependencies && \
5460
rm -rf \
5561
/tmp/* \
56-
/root/.cache
62+
$HOME/.cache \
63+
$HOME/.cargo
5764

5865
# add local files
59-
COPY ./root/ /
66+
COPY root/ /
67+
68+
# ports and volumes
69+
EXPOSE 80 443
70+
VOLUME /config

Dockerfile.aarch64

+29-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.14
1+
# syntax=docker/dockerfile:1
2+
3+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.17
24

35
# set version label
46
ARG BUILD_DATE
@@ -7,30 +9,34 @@ ARG DISKOVER_RELEASE
79
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
810
LABEL maintainer="alex-phillips"
911

12+
# environment settings
13+
ENV DISKOVERDIR=/config/diskover.conf.d/diskover/
14+
1015
RUN \
1116
echo "**** install build packages ****" && \
1217
apk add --no-cache --virtual=build-dependencies \
1318
build-base \
14-
gcc \
15-
py3-pip \
16-
python3-dev \
19+
cargo \
1720
composer \
18-
curl \
1921
git \
20-
jq \
2122
nodejs \
22-
npm && \
23+
npm \
24+
python3-dev && \
2325
echo "**** install runtime packages ****" && \
24-
apk add --no-cache \
26+
apk add --no-cache \
2527
libldap \
2628
ncurses \
27-
php7-curl \
28-
php7-ldap \
29-
php7-sqlite3 \
29+
php81-curl \
30+
php81-ldap \
31+
php81-sqlite3 \
3032
py3-requests \
3133
py3-urllib3 \
3234
py3-xxhash \
3335
python3 && \
36+
echo "**** configure php-fpm to pass env vars ****" && \
37+
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \
38+
grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \
39+
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \
3440
echo "**** install diskover ****" && \
3541
if [ -z ${DISKOVER_RELEASE+x} ]; then \
3642
DISKOVER_RELEASE=$(curl -sX GET "https://api.github.com/repos/diskoverdata/diskover-community/releases" \
@@ -43,17 +49,22 @@ RUN \
4349
/tmp/diskover.tar.gz -C \
4450
/app/ --strip-components=1 && \
4551
cd /app/diskover && \
46-
pip3 install --no-cache-dir -r requirements.txt && \
47-
sed -i 's@;clear_env = no@clear_env = no@' "/etc/php7/php-fpm.d/www.conf" && \
48-
echo "**** overlay-fs workaround ****" && \
49-
mv /app/diskover /app/diskover-tmp && \
50-
mv /app/diskover-web /app/diskover-web-tmp && \
52+
python3 -m ensurepip && \
53+
pip3 install -U --no-cache-dir \
54+
pip \
55+
wheel && \
56+
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r requirements.txt && \
5157
echo "**** cleanup ****" && \
5258
apk del --purge \
5359
build-dependencies && \
5460
rm -rf \
5561
/tmp/* \
56-
/root/.cache
62+
$HOME/.cache \
63+
$HOME/.cargo
5764

5865
# add local files
59-
COPY ./root/ /
66+
COPY root/ /
67+
68+
# ports and volumes
69+
EXPOSE 80 443
70+
VOLUME /config

Dockerfile.armhf

+29-18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.14
1+
# syntax=docker/dockerfile:1
2+
3+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm32v7-3.17
24

35
# set version label
46
ARG BUILD_DATE
@@ -7,30 +9,34 @@ ARG DISKOVER_RELEASE
79
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
810
LABEL maintainer="alex-phillips"
911

12+
# environment settings
13+
ENV DISKOVERDIR=/config/diskover.conf.d/diskover/
14+
1015
RUN \
1116
echo "**** install build packages ****" && \
1217
apk add --no-cache --virtual=build-dependencies \
1318
build-base \
14-
gcc \
15-
py3-pip \
16-
python3-dev \
19+
cargo \
1720
composer \
18-
curl \
1921
git \
20-
jq \
2122
nodejs \
22-
npm && \
23+
npm \
24+
python3-dev && \
2325
echo "**** install runtime packages ****" && \
24-
apk add --no-cache \
26+
apk add --no-cache \
2527
libldap \
2628
ncurses \
27-
php7-curl \
28-
php7-ldap \
29-
php7-sqlite3 \
29+
php81-curl \
30+
php81-ldap \
31+
php81-sqlite3 \
3032
py3-requests \
3133
py3-urllib3 \
3234
py3-xxhash \
3335
python3 && \
36+
echo "**** configure php-fpm to pass env vars ****" && \
37+
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php81/php-fpm.d/www.conf && \
38+
grep -qxF 'clear_env = no' /etc/php81/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php81/php-fpm.d/www.conf && \
39+
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php81/php-fpm.conf && \
3440
echo "**** install diskover ****" && \
3541
if [ -z ${DISKOVER_RELEASE+x} ]; then \
3642
DISKOVER_RELEASE=$(curl -sX GET "https://api.github.com/repos/diskoverdata/diskover-community/releases" \
@@ -43,17 +49,22 @@ RUN \
4349
/tmp/diskover.tar.gz -C \
4450
/app/ --strip-components=1 && \
4551
cd /app/diskover && \
46-
pip3 install --no-cache-dir -r requirements.txt && \
47-
sed -i 's@;clear_env = no@clear_env = no@' "/etc/php7/php-fpm.d/www.conf" && \
48-
echo "**** overlay-fs workaround ****" && \
49-
mv /app/diskover /app/diskover-tmp && \
50-
mv /app/diskover-web /app/diskover-web-tmp && \
52+
python3 -m ensurepip && \
53+
pip3 install -U --no-cache-dir \
54+
pip \
55+
wheel && \
56+
pip3 install -U --no-cache-dir --find-links https://wheel-index.linuxserver.io/alpine-3.17/ -r requirements.txt && \
5157
echo "**** cleanup ****" && \
5258
apk del --purge \
5359
build-dependencies && \
5460
rm -rf \
5561
/tmp/* \
56-
/root/.cache
62+
$HOME/.cache \
63+
$HOME/.cargo
5764

5865
# add local files
59-
COPY ./root/ /
66+
COPY root/ /
67+
68+
# ports and volumes
69+
EXPOSE 80 443
70+
VOLUME /config

Jenkinsfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ pipeline {
3030
DIST_IMAGE = 'alpine'
3131
MULTIARCH='true'
3232
CI='true'
33-
CI_WEB='false'
34-
CI_PORT=''
35-
CI_SSL=''
33+
CI_WEB='true'
34+
CI_PORT='80'
35+
CI_SSL='false'
3636
CI_DELAY='120'
3737
CI_DOCKERENV='TZ=US/Pacific'
38-
CI_AUTH=''
38+
CI_AUTH='user:password'
3939
CI_WEBPATH=''
4040
}
4141
stages {

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
271271

272272
## Versions
273273

274+
* **20.08.22:** - Rebasing to alpine 3.17 with php8.1. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base)).
274275
* **25.02.22:** - Add php7-sqlite3 to support rc4 release.
275276
* **03.11.21:** - Added more support for potential config files.
276277
* **31.10.21:** - Added xpack.security variable to ElasticSearch; added instructions to edit Constants.php in diskover; corrected command needed to manually generate an index in diskover

jenkins-vars.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ repo_vars:
2020
- DIST_IMAGE = 'alpine'
2121
- MULTIARCH='true'
2222
- CI='true'
23-
- CI_WEB='false'
24-
- CI_PORT=''
25-
- CI_SSL=''
23+
- CI_WEB='true'
24+
- CI_PORT='80'
25+
- CI_SSL='false'
2626
- CI_DELAY='120'
2727
- CI_DOCKERENV='TZ=US/Pacific'
28-
- CI_AUTH=''
28+
- CI_AUTH='user:password'
2929
- CI_WEBPATH=''

readme-vars.yml

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ app_setup_block: |
9494
9595
# changelog
9696
changelogs:
97+
- { date: "20.08.22:", desc: "Rebasing to alpine 3.17 with php8.1. Restructure nginx configs ([see changes announcement](https://info.linuxserver.io/issues/2022-08-20-nginx-base))." }
9798
- { date: "25.02.22:", desc: "Add php7-sqlite3 to support rc4 release." }
9899
- { date: "03.11.21:", desc: "Added more support for potential config files." }
99100
- { date: "31.10.21:", desc: "Added xpack.security variable to ElasticSearch; added instructions to edit Constants.php in diskover; corrected command needed to manually generate an index in diskover" }

root/defaults/crontabs/abc

-1
This file was deleted.

root/defaults/default

-38
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Version 2023/01/23 - Changelog: https://github.com/linuxserver/docker-diskover/commits/master/root/defaults/nginx/site-confs/default.conf.sample
2+
3+
server {
4+
listen 80 default_server;
5+
listen [::]:80 default_server;
6+
7+
listen 443 ssl http2 default_server;
8+
listen [::]:443 ssl http2 default_server;
9+
10+
server_name _;
11+
12+
root /app/diskover-web/public;
13+
index index.html index.htm index.php;
14+
15+
location / {
16+
# enable for basic auth
17+
#auth_basic "Restricted";
18+
#auth_basic_user_file /config/nginx/.htpasswd;
19+
20+
try_files $uri $uri/ /index.php$is_args$args;
21+
}
22+
23+
location ~ ^(.+\.php)(.*)$ {
24+
fastcgi_split_path_info ^(.+\.php)(.*)$;
25+
fastcgi_pass 127.0.0.1:9000;
26+
fastcgi_index index.php;
27+
include /etc/nginx/fastcgi_params;
28+
}
29+
30+
# deny access to .htaccess/.htpasswd files
31+
location ~ /\.ht {
32+
deny all;
33+
}
34+
}

root/etc/cont-init.d/50-permissions

-13
This file was deleted.

0 commit comments

Comments
 (0)