Compare commits

...

66 Commits

Author SHA1 Message Date
aptalca
49a9390a5d match bazarr's dev version 2018-11-05 16:19:28 -05:00
aptalca
a64b9e838a pull the master branch of heimdall 2018-11-05 16:03:55 -05:00
aptalca
9659004f69 Update Jenkinsfile 2018-11-05 15:47:59 -05:00
aptalca
d733b73d4c Merge pull request #21 from KodeStar/master
Update 50-config
2018-11-05 10:10:41 -05:00
KodeStar
c707b2d071 Update 50-config 2018-11-05 15:01:46 +00:00
aptalca
cdb341b0e0 Merge pull request #20 from KodeStar/master
Add missing folder to mkdir
2018-11-05 09:16:14 -05:00
KodeStar
965642e618 Add missing folder to mkdir 2018-11-05 14:05:26 +00:00
j0nnymoe
c379a17320 Merge pull request #19 from KodeStar/patch-2
Symlink SupportedApps to the config folder
2018-11-05 12:34:37 +00:00
KodeStar
a39112cc00 Symlink SupportedApps to the config folder 2018-11-05 12:14:21 +00:00
saarg
f9f40751fb Merge pull request #18 from linuxserver/zip
Add php7-zip
2018-11-05 07:37:20 +01:00
aptalca
c339f6a055 fix formatting 2018-11-04 22:07:01 -05:00
aptalca
8c52faae78 add php7-zip 2018-11-04 18:26:08 -05:00
LinuxServer-CI
9e78392b5f Bot Updating Package Versions 2018-11-04 22:02:57 +00:00
j0nnymoe
722ce4ad2a Merge pull request #17 from KodeStar/patch-1
add php7-zip
2018-11-04 21:54:01 +00:00
KodeStar
b6eba9fa1c add php7-zip 2018-11-04 21:36:07 +00:00
LinuxServer-CI
17a95129e0 Bot Updating Package Versions 2018-11-03 04:50:01 +00:00
LinuxServer-CI
a531ca2e62 Bot Updating Package Versions 2018-11-02 21:49:35 +00:00
j0nnymoe
561ba7ff5d Merge pull request #15 from thelamer/master
adding updated build logic for package tagging to repo
2018-11-02 21:46:09 +00:00
thelamer
8deb667283 adding updated build logic for package tagging to repo 2018-11-02 00:28:03 -07:00
aptalca
0eb310aa07 Merge pull request #14 from linuxserver/queue
Add queue service
2018-11-01 16:32:54 -04:00
aptalca
536409cf5f set queue driver to database 2018-10-31 18:32:55 -04:00
aptalca
3f642a6dc8 update readme 2018-10-31 20:47:03 +00:00
aptalca
270d9753f7 add queue service 2018-10-31 16:36:17 -04:00
aptalca
b0ee245e54 Merge pull request #13 from linuxserver/avatars
Symlink avatars folder
2018-10-17 17:18:35 -04:00
Alex Kretzschmar
6e17ad1836 Merge pull request #12 from linuxserver/fastcgi
Update fastcgi_params for user login support
2018-10-16 13:53:24 -04:00
aptalca
db4c2697b6 Symlink avatars folder 2018-10-13 14:50:22 +00:00
aptalca
8a288bbef9 add comment 2018-10-13 11:51:51 +00:00
aptalca
a310917220 Update fastcgi_params for user login support 2018-10-13 11:30:51 +00:00
chbmb
7be5c43f83 Merge pull request #11 from linuxserver/symlink
Symlink .env rather than copy
2018-10-07 20:33:23 +01:00
aptalca
80d7e5e8c7 Symlink .env rather than copy 2018-10-07 12:07:45 -04:00
thelamer
7c3bb91996 removing uneeded block logic for meta tagging the docker endpoints from the JenkinsFile 2018-10-05 23:14:54 -07:00
aptalca
296e912007 Merge pull request #10 from linuxserver/pipeline
Pipeline
2018-10-05 17:29:04 -04:00
thelamer
918f8595f4 missed the latest tag for the arm64 manifest tag 2018-10-05 14:09:25 -07:00
thelamer
6a66ca1514 modifying the manifest variant tagging to match other docker images 2018-10-05 13:55:08 -07:00
Ryan Kuba
570682688c Merge pull request #9 from linuxserver/pipeline
Pipeline
2018-10-05 13:32:11 -07:00
thelamer
2f45091fcb updating multi push section with correct meta tagging logic and upping testing poeriod to 2 minutes 2018-10-01 15:37:43 -07:00
thelamer
f690a07e6f need at least one docker env variable in the testing run 2018-10-01 15:15:57 -07:00
aptalca
ac9ece5ec7 update readme 2018-10-01 11:47:21 -04:00
aptalca
f83f502a6b update readme 2018-10-01 11:34:49 -04:00
aptalca
6addc89456 fix typos, update readme 2018-10-01 09:28:49 -04:00
aptalca
97aadc5cd5 Update readme-vars.yml 2018-09-30 18:38:15 -04:00
aptalca
1127f3c8c0 use heimdall release arg 2018-09-30 18:36:10 -04:00
aptalca
59cf5de1df close if 2018-09-30 18:35:43 -04:00
aptalca
7ec298119a use heimdall release arg 2018-09-30 18:35:04 -04:00
aptalca
1bf8687db0 use heimdall release arg 2018-09-30 18:33:29 -04:00
aptalca
64cfc2f9d7 Create Jenkinsfile 2018-09-30 17:48:17 -04:00
aptalca
162ac78551 sync .env 2018-09-30 17:37:22 -04:00
aptalca
22eb45277a update readme 2018-09-30 14:18:21 -04:00
aptalca
e1a96c0d42 Create readme-vars.yml 2018-09-30 14:10:15 -04:00
aptalca
03499b444a Create Dockerfile.aarch64 2018-09-30 13:47:20 -04:00
aptalca
06b761c9f0 Create Dockerfile.armhf 2018-09-30 13:43:13 -04:00
sparklyballs
507bc638db Merge pull request #8 from linuxserver/rebase_alpine_3.8
rebase to alpine 3.8
2018-09-05 19:11:31 +01:00
sparklyballs
c40e021452 rebase to alpine 3.8 2018-09-05 11:00:38 +01:00
sparklyballs
46e95f4da6 rebase to alpine 3.8 2018-09-05 10:56:07 +01:00
aptalca
9b63642fed Merge pull request #6 from linuxserver/password
Password protection
2018-03-07 17:57:15 -05:00
aptalca
614bba2960 fix typo 2018-03-06 13:48:12 -05:00
aptalca
f084b90282 fix if statement logic 2018-03-06 13:44:17 -05:00
aptalca
bce88664bf Update README.md 2018-03-06 13:11:03 -05:00
aptalca
1bc1af427b Use htpasswd if exists 2018-03-06 13:01:22 -05:00
sparklyballs
78ecdea6d6 Merge pull request #4 from linuxserver/release
Release
2018-02-12 15:22:08 +00:00
aptalca
f030577f75 Fix typo 2018-02-12 08:21:34 -05:00
aptalca
992949bd7c Update README.md 2018-02-12 08:17:13 -05:00
aptalca
b34b1691f4 Update README.md 2018-02-12 08:16:31 -05:00
aptalca
9386537608 Rename READMETEMPLATE.md to README.md 2018-02-11 10:20:36 -05:00
aptalca
3ed22863f7 Delete README.md 2018-02-11 10:20:17 -05:00
aptalca
b357db7900 Update READMETEMPLATE.md 2018-02-11 10:20:01 -05:00
11 changed files with 1000 additions and 109 deletions

View File

@@ -1,35 +1,43 @@
FROM lsiobase/alpine.nginx:3.7
FROM lsiobase/alpine.nginx:3.8
# set version label
ARG BUILD_DATE
ARG VERSION
ARG HEIMDALL_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
# install packages
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-pdo_sqlite \
php7-tokenizer \
php7-zip \
tar && \
echo "**** install heimdall ****" && \
HEIM_VER="$(curl -sX GET https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep 'tag_name' | cut -d\" -f4)" && \
mkdir -p \
/var/www/localhost/heimdall && \
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/master" \
| awk '/sha/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/heimdall.tar.gz -L \
"https://github.com/linuxserver/Heimdall/archive/${HEIM_VER}.tar.gz" && \
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
tar xf \
/tmp/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo "** cleanup **" && \
echo "**** configure nginx ****" && \
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
/etc/nginx/fastcgi_params && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
/tmp/*
# add local files
COPY root/ /

46
Dockerfile.aarch64 Normal file
View File

@@ -0,0 +1,46 @@
FROM lsiobase/alpine.nginx.arm64:3.8
# Add qemu to build on x86_64 systems
COPY qemu-aarch64-static /usr/bin
# set version label
ARG BUILD_DATE
ARG VERSION
ARG HEIMDALL_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-pdo_sqlite \
php7-tokenizer \
php7-zip \
tar && \
echo "**** install heimdall ****" && \
mkdir -p \
/var/www/localhost/heimdall && \
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/master" \
| awk '/sha/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/heimdall.tar.gz -L \
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
tar xf \
/tmp/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo "**** configure nginx ****" && \
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
/etc/nginx/fastcgi_params && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add local files
COPY root/ /

46
Dockerfile.armhf Normal file
View File

@@ -0,0 +1,46 @@
FROM lsiobase/alpine.nginx.armhf:3.8
# Add qemu to build on x86_64 systems
COPY qemu-arm-static /usr/bin
# set version label
ARG BUILD_DATE
ARG VERSION
ARG HEIMDALL_RELEASE
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# environment settings
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2
RUN \
echo "**** install runtime packages ****" && \
apk add --no-cache \
curl \
php7-ctype \
php7-pdo_sqlite \
php7-tokenizer \
php7-zip \
tar && \
echo "**** install heimdall ****" && \
mkdir -p \
/var/www/localhost/heimdall && \
if [ -z ${HEIMDALL_RELEASE+x} ]; then \
HEIMDALL_RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/commits/master" \
| awk '/sha/{print $4;exit}' FS='[""]'); \
fi && \
curl -o \
/tmp/heimdall.tar.gz -L \
"https://github.com/linuxserver/Heimdall/archive/${HEIMDALL_RELEASE}.tar.gz" && \
tar xf \
/tmp/heimdall.tar.gz -C \
/var/www/localhost/heimdall --strip-components=1 && \
echo "**** configure nginx ****" && \
echo -e '\n# Heimdall user authorization\nfastcgi_param PHP_AUTH_USER $remote_user;\nfastcgi_param PHP_AUTH_PW $http_authorization;' >> \
/etc/nginx/fastcgi_params && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add local files
COPY root/ /

581
Jenkinsfile vendored Normal file
View File

@@ -0,0 +1,581 @@
pipeline {
agent {
label 'X86-64-MULTI'
}
// Input to determine if this is a package check
parameters {
string(defaultValue: 'false', description: 'package check run', name: 'PACKAGE_CHECK')
}
// Configuration for the variables used for this specific repo
environment {
EXT_GIT_BRANCH = 'master'
EXT_USER = 'linuxserver'
EXT_REPO = 'Heimdall'
BUILD_VERSION_ARG = 'HEIMDALL_RELEASE'
LS_USER = 'linuxserver'
LS_REPO = 'docker-heimdall'
CONTAINER_NAME = 'heimdall'
DOCKERHUB_IMAGE = 'linuxserver/heimdall'
DEV_DOCKERHUB_IMAGE = 'lsiodev/heimdall'
PR_DOCKERHUB_IMAGE = 'lspipepr/heimdall'
BUILDS_DISCORD = credentials('build_webhook_url')
GITHUB_TOKEN = credentials('498b4638-2d02-4ce5-832d-8a57d01d97ab')
DIST_IMAGE = 'alpine'
MULTIARCH='true'
CI='true'
CI_WEB='true'
CI_PORT='80'
CI_SSL='false'
CI_DELAY='120'
CI_DOCKERENV='TZ=US/Pacific'
CI_AUTH='user:password'
CI_WEBPATH=''
}
stages {
// Setup all the basic environment variables needed for the build
stage("Set ENV Variables base"){
steps{
script{
env.EXIT_STATUS = ''
env.LS_RELEASE = sh(
script: '''curl -s https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases | jq -r 'first(.[] | select(.prerelease == true)) | .tag_name' ''',
returnStdout: true).trim()
env.LS_RELEASE_NOTES = sh(
script: '''git log -1 --pretty=%B | sed -E ':a;N;$!ba;s/\\r{0,1}\\n/\\\\n/g' ''',
returnStdout: true).trim()
env.GITHUB_DATE = sh(
script: '''date '+%Y-%m-%dT%H:%M:%S%:z' ''',
returnStdout: true).trim()
env.COMMIT_SHA = sh(
script: '''git rev-parse HEAD''',
returnStdout: true).trim()
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/commit/' + env.GIT_COMMIT
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
env.PULL_REQUEST = env.CHANGE_ID
}
script{
env.LS_RELEASE_NUMBER = sh(
script: '''echo ${LS_RELEASE} |sed 's/^.*-ls//g' ''',
returnStdout: true).trim()
}
script{
env.LS_TAG_NUMBER = sh(
script: '''#! /bin/bash
tagsha=$(git rev-list -n 1 ${LS_RELEASE} 2>/dev/null)
if [ "${tagsha}" == "${COMMIT_SHA}" ]; then
echo ${LS_RELEASE_NUMBER}
elif [ -z "${GIT_COMMIT}" ]; then
echo ${LS_RELEASE_NUMBER}
else
echo $((${LS_RELEASE_NUMBER} + 1))
fi''',
returnStdout: true).trim()
}
}
}
/* #######################
Package Version Tagging
####################### */
// Grab the current package versions in Git to determine package tag
stage("Set Package tag"){
steps{
script{
env.PACKAGE_TAG = sh(
script: '''#!/bin/bash
http_code=$(curl --write-out %{http_code} -s -o /dev/null \
https://raw.githubusercontent.com/${LS_USER}/${LS_REPO}/master/package_versions.txt)
if [[ "${http_code}" -ne 200 ]] ; then
echo none
else
curl -s \
https://raw.githubusercontent.com/${LS_USER}/${LS_REPO}/master/package_versions.txt \
| md5sum | cut -c1-8
fi''',
returnStdout: true).trim()
}
}
}
/* ########################
External Release Tagging
######################## */
// If this is a github commit trigger determine the current commit at head
stage("Set ENV github_commit"){
steps{
script{
env.EXT_RELEASE = sh(
script: '''curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq -r '. | .sha' | cut -c1-8 ''',
returnStdout: true).trim()
}
}
}
// If this is a github commit trigger Set the external release link
stage("Set ENV commit_link"){
steps{
script{
env.RELEASE_LINK = 'https://github.com/' + env.EXT_USER + '/' + env.EXT_REPO + '/commit/' + env.EXT_RELEASE
}
}
}
// If this is a master build use live docker endpoints
stage("Set ENV live build"){
when {
branch "development"
environment name: 'CHANGE_ID', value: ''
}
steps {
script{
env.IMAGE = env.DOCKERHUB_IMAGE
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE + '-ls' + env.LS_TAG_NUMBER + '|arm32v6-' + env.EXT_RELEASE + '-ls' + env.LS_TAG_NUMBER + '|arm64v8-' + env.EXT_RELEASE + '-ls' + env.LS_TAG_NUMBER
} else {
env.CI_TAGS = env.EXT_RELEASE + '-ls' + env.LS_TAG_NUMBER
}
env.META_TAG = env.EXT_RELEASE + '-ls' + env.LS_TAG_NUMBER
}
}
}
// If this is a dev build use dev docker endpoints
stage("Set ENV dev build"){
when {
not {branch "development"}
environment name: 'CHANGE_ID', value: ''
}
steps {
script{
env.IMAGE = env.DEV_DOCKERHUB_IMAGE
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm32v6-' + env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA + '|arm64v8-' + env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
} else {
env.CI_TAGS = env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
}
env.META_TAG = env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-dev-' + env.COMMIT_SHA
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DEV_DOCKERHUB_IMAGE + '/tags/'
}
}
}
// If this is a pull request build use dev docker endpoints
stage("Set ENV PR build"){
when {
not {environment name: 'CHANGE_ID', value: ''}
}
steps {
script{
env.IMAGE = env.PR_DOCKERHUB_IMAGE
if (env.MULTIARCH == 'true') {
env.CI_TAGS = 'amd64-' + env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm32v6-' + env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST + '|arm64v8-' + env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
} else {
env.CI_TAGS = env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
}
env.META_TAG = env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-pr-' + env.PULL_REQUEST
env.CODE_URL = 'https://github.com/' + env.LS_USER + '/' + env.LS_REPO + '/pull/' + env.PULL_REQUEST
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.PR_DOCKERHUB_IMAGE + '/tags/'
}
}
}
// Use helper container to render a readme from the template if needed
stage('Update-README') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
expression {
env.CONTAINER_NAME != null
}
}
steps {
sh '''#! /bin/bash
TEMPDIR=$(mktemp -d)
docker pull linuxserver/doc-builder:latest
docker run --rm -e CONTAINER_NAME=${CONTAINER_NAME} -v ${TEMPDIR}:/ansible/readme linuxserver/doc-builder:latest
if [ "$(md5sum ${TEMPDIR}/${CONTAINER_NAME}/README.md | awk '{ print $1 }')" != "$(md5sum README.md | awk '{ print $1 }')" ]; then
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
cp ${TEMPDIR}/${CONTAINER_NAME}/README.md ${TEMPDIR}/${LS_REPO}/
cd ${TEMPDIR}/${LS_REPO}/
git --git-dir ${TEMPDIR}/${LS_REPO}/.git add README.md
git --git-dir ${TEMPDIR}/${LS_REPO}/.git commit -m 'Bot Updating README from template'
git --git-dir ${TEMPDIR}/${LS_REPO}/.git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
else
echo "false" > /tmp/${COMMIT_SHA}-${BUILD_NUMBER}
fi
rm -Rf ${TEMPDIR}'''
script{
env.README_UPDATED = sh(
script: '''cat /tmp/${COMMIT_SHA}-${BUILD_NUMBER}''',
returnStdout: true).trim()
}
}
}
// Exit the build if the Readme was just updated
stage('README-exit') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'README_UPDATED', value: 'true'
expression {
env.CONTAINER_NAME != null
}
}
steps {
script{
env.EXIT_STATUS = 'ABORTED'
}
}
}
/* ###############
Build Container
############### */
// Build Docker container for push to LS Repo
stage('Build-Single') {
when {
environment name: 'MULTIARCH', value: 'false'
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh "docker build --no-cache -t ${IMAGE}:${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
// Build MultiArch Docker containers for push to LS Repo
stage('Build-Multi') {
when {
environment name: 'MULTIARCH', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
parallel {
stage('Build X86') {
steps {
sh "docker build --no-cache -t ${IMAGE}:amd64-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
}
}
stage('Build ARMHF') {
agent {
label 'ARMHF'
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
echo 'Logging into DockerHub'
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-arm-static -o qemu-arm-static"
sh "chmod +x qemu-*"
sh "docker build --no-cache -f Dockerfile.armhf -t ${IMAGE}:arm32v6-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm32v6-${META_TAG} lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}"
sh "docker push lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}"
}
}
}
stage('Build ARM64') {
agent {
label 'ARM64'
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
echo 'Logging into DockerHub'
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh "curl https://lsio-ci.ams3.digitaloceanspaces.com/qemu-aarch64-static -o qemu-aarch64-static"
sh "chmod +x qemu-*"
sh "docker build --no-cache -f Dockerfile.aarch64 -t ${IMAGE}:arm64v8-${META_TAG} \
--build-arg ${BUILD_VERSION_ARG}=${EXT_RELEASE} --build-arg VERSION=\"${META_TAG}\" --build-arg BUILD_DATE=${GITHUB_DATE} ."
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
sh "docker push lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}"
}
}
}
}
}
// Take the image we just built and dump package versions for comparison
stage('Update-packages') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
sh '''#! /bin/bash
TEMPDIR=$(mktemp -d)
if [ "${MULTIARCH}" == "true" ]; then
LOCAL_CONTAINER=${IMAGE}:amd64-${META_TAG}
else
LOCAL_CONTAINER=${IMAGE}:${META_TAG}
fi
if [ "${DIST_IMAGE}" == "alpine" ]; then
docker run --rm -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} sh -c '\
apk info > packages && \
apk info -v > versions && \
paste -d " " packages versions > /tmp/package_versions.txt'
elif [ "${DIST_IMAGE}" == "ubuntu" ]; then
docker run --rm -v ${TEMPDIR}:/tmp ${LOCAL_CONTAINER} sh -c '\
apt -qq list --installed | awk "{print \$1,\$2}" > /tmp/package_versions.txt'
fi
if [ "$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )" != "${PACKAGE_TAG}" ]; then
git clone https://github.com/${LS_USER}/${LS_REPO}.git ${TEMPDIR}/${LS_REPO}
cp ${TEMPDIR}/package_versions.txt ${TEMPDIR}/${LS_REPO}/
cd ${TEMPDIR}/${LS_REPO}/
git --git-dir ${TEMPDIR}/${LS_REPO}/.git add package_versions.txt
git --git-dir ${TEMPDIR}/${LS_REPO}/.git commit -m 'Bot Updating Package Versions'
git --git-dir ${TEMPDIR}/${LS_REPO}/.git push https://LinuxServer-CI:${GITHUB_TOKEN}@github.com/${LS_USER}/${LS_REPO}.git --all
echo "true" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
else
echo "false" > /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}
fi
rm -Rf ${TEMPDIR}'''
script{
env.PACKAGE_UPDATED = sh(
script: '''cat /tmp/packages-${COMMIT_SHA}-${BUILD_NUMBER}''',
returnStdout: true).trim()
}
}
}
// Exit the build if the package file was just updated
stage('PACKAGE-exit') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
script{
env.EXIT_STATUS = 'ABORTED'
}
}
}
// Exit the build if this is just a package check and there are no changes to push
stage('PACKAGECHECK-exit') {
when {
branch "master"
environment name: 'CHANGE_ID', value: ''
environment name: 'PACKAGE_UPDATED', value: 'false'
environment name: 'EXIT_STATUS', value: ''
expression {
params.PACKAGE_CHECK == 'true'
}
}
steps {
script{
env.EXIT_STATUS = 'ABORTED'
}
}
}
/* #######
Testing
####### */
// Run Container tests
stage('Test') {
when {
environment name: 'CI', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
string(credentialsId: 'spaces-key', variable: 'DO_KEY'),
string(credentialsId: 'spaces-secret', variable: 'DO_SECRET')
]) {
sh '''#! /bin/bash
docker pull lsiodev/ci:latest
if [ "${MULTIARCH}" == "true" ]; then
docker pull lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${META_TAG}
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi
docker run --rm \
-v /var/run/docker.sock:/var/run/docker.sock \
-e IMAGE=\"${IMAGE}\" \
-e DELAY_START=\"${CI_DELAY}\" \
-e TAGS=\"${CI_TAGS}\" \
-e META_TAG=\"${META_TAG}\" \
-e PORT=\"${CI_PORT}\" \
-e SSL=\"${CI_SSL}\" \
-e BASE=\"${DIST_IMAGE}\" \
-e SECRET_KEY=\"${DO_SECRET}\" \
-e ACCESS_KEY=\"${DO_KEY}\" \
-e DOCKER_ENV=\"${CI_DOCKERENV}\" \
-e WEB_SCREENSHOT=\"${CI_WEB}\" \
-e WEB_AUTH=\"${CI_AUTH}\" \
-e WEB_PATH=\"${CI_WEBPATH}\" \
-e DO_REGION="ams3" \
-e DO_BUCKET="lsio-ci" \
-t lsiodev/ci:latest \
python /ci/ci.py'''
script{
env.CI_URL = 'https://lsio-ci.ams3.digitaloceanspaces.com/' + env.IMAGE + '/' + env.META_TAG + '/index.html'
}
}
}
}
/* ##################
Release Logic
################## */
// If this is an amd64 only image only push a single image
stage('Docker-Push-Single') {
when {
environment name: 'MULTIARCH', value: 'false'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
echo 'Logging into DockerHub'
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh "docker tag ${IMAGE}:${META_TAG} ${IMAGE}:development"
sh "docker push ${IMAGE}:development"
sh "docker push ${IMAGE}:${META_TAG}"
}
}
}
// If this is a multi arch release push all images and define the manifest
stage('Docker-Push-Multi') {
when {
environment name: 'MULTIARCH', value: 'true'
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin
'''
sh '''#! /bin/bash
if [ "${CI}" == "false" ]; then
docker pull lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER}
docker pull lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER}
docker tag lsiodev/buildcache:arm32v6-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm32v6-${META_TAG}
docker tag lsiodev/buildcache:arm64v8-${COMMIT_SHA}-${BUILD_NUMBER} ${IMAGE}:arm64v8-${META_TAG}
fi'''
sh "docker tag ${IMAGE}:amd64-${META_TAG} ${IMAGE}:amd64-development"
sh "docker tag ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm32v6-development"
sh "docker tag ${IMAGE}:arm64v8-${META_TAG} ${IMAGE}:arm64v8-development"
sh "docker push ${IMAGE}:amd64-${META_TAG}"
sh "docker push ${IMAGE}:arm32v6-${META_TAG}"
sh "docker push ${IMAGE}:arm64v8-${META_TAG}"
sh "docker push ${IMAGE}:amd64-development"
sh "docker push ${IMAGE}:arm32v6-development"
sh "docker push ${IMAGE}:arm64v8-development"
sh "docker manifest push --purge ${IMAGE}:development || :"
sh "docker manifest create ${IMAGE}:development ${IMAGE}:amd64-development ${IMAGE}:arm32v6-development ${IMAGE}:arm64v8-development"
sh "docker manifest annotate ${IMAGE}:development ${IMAGE}:arm32v6-development --os linux --arch arm"
sh "docker manifest annotate ${IMAGE}:development ${IMAGE}:arm64v8-development --os linux --arch arm64 --variant v8"
sh "docker manifest push --purge ${IMAGE}:${EXT_RELEASE}-ls${LS_TAG_NUMBER} || :"
sh "docker manifest create ${IMAGE}:${META_TAG} ${IMAGE}:amd64-${META_TAG} ${IMAGE}:arm32v6-${META_TAG} ${IMAGE}:arm64v8-${META_TAG}"
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm32v6-${META_TAG} --os linux --arch arm"
sh "docker manifest annotate ${IMAGE}:${META_TAG} ${IMAGE}:arm64v8-${META_TAG} --os linux --arch arm64 --variant v8"
sh "docker manifest push --purge ${IMAGE}:development"
sh "docker manifest push --purge ${IMAGE}:${META_TAG}"
}
}
}
// If this is a public release tag it in the LS Github and push a changelog from external repo and our internal one
stage('Github-Tag-Push-Release') {
when {
branch "development"
expression {
env.LS_RELEASE != env.EXT_RELEASE + '-pkg-' + env.PACKAGE_TAG + '-ls' + env.LS_TAG_NUMBER
}
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
echo "Pushing New tag for current commit ${EXT_RELEASE}-pkg-${PACKAGE_TAG}-ls${LS_TAG_NUMBER}"
sh '''curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/git/tags \
-d '{"tag":"'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"object": "'${COMMIT_SHA}'",\
"message": "Tagging Release '${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}' to development",\
"type": "commit",\
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
curl -s https://api.github.com/repos/${EXT_USER}/${EXT_REPO}/commits/${EXT_GIT_BRANCH} | jq '. | .commit.message' | sed 's:^.\\(.*\\).$:\\1:' > releasebody.json
echo '{"tag_name":"'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"target_commitish": "development",\
"name": "'${EXT_RELEASE}'-pkg-'${PACKAGE_TAG}'-ls'${LS_TAG_NUMBER}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n**'${EXT_REPO}' Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": true}' >> releasebody.json
paste -d'\\0' start releasebody.json > releasebody.json.done
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''
}
}
// Use helper container to sync the current README on master to the dockerhub endpoint
stage('Sync-README') {
when {
environment name: 'CHANGE_ID', value: ''
environment name: 'EXIT_STATUS', value: ''
}
steps {
withCredentials([
[
$class: 'UsernamePasswordMultiBinding',
credentialsId: '3f9ba4d5-100d-45b0-a3c4-633fd6061207',
usernameVariable: 'DOCKERUSER',
passwordVariable: 'DOCKERPASS'
]
]) {
sh '''#! /bin/bash
docker pull lsiodev/readme-sync
docker run --rm=true \
-e DOCKERHUB_USERNAME=$DOCKERUSER \
-e DOCKERHUB_PASSWORD=$DOCKERPASS \
-e GIT_REPOSITORY=${LS_USER}/${LS_REPO} \
-e DOCKER_REPOSITORY=${IMAGE} \
-e GIT_BRANCH=master \
lsiodev/readme-sync bash -c 'node sync' '''
}
}
}
}
/* ######################
Send status to Discord
###################### */
post {
always {
script{
if (env.EXIT_STATUS == "ABORTED"){
sh 'echo "build aborted"'
}
else if (currentBuild.currentResult == "SUCCESS"){
sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 1681177,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**Status:** Success\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
else {
sh ''' curl -X POST --data '{"avatar_url": "https://wiki.jenkins-ci.org/download/attachments/2916393/headshot.png","embeds": [{"color": 16711680,\
"description": "**Build:** '${BUILD_NUMBER}'\\n**CI Results:** '${CI_URL}'\\n**Status:** failure\\n**Job:** '${RUN_DISPLAY_URL}'\\n**Change:** '${CODE_URL}'\\n**External Release:**: '${RELEASE_LINK}'\\n**DockerHub:** '${DOCKERHUB_LINK}'\\n"}],\
"username": "Jenkins"}' ${BUILDS_DISCORD} '''
}
}
}
}
}

159
README.md
View File

@@ -1,15 +1,154 @@
[linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io
[ircurl]: https://www.linuxserver.io/irc/
[podcasturl]: https://www.linuxserver.io/podcast/
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)](https://linuxserver.io)
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
The [LinuxServer.io](https://linuxserver.io) team brings you another container release featuring :-
## This is a Container in active development by the [LinuxServer.io][linuxserverurl] team and is not recommended for use by the general public.
* regular and timely application updates
* easy user mappings (PGID, PUID)
* custom base image with s6 overlay
* weekly base OS updates with common layers across the entire LinuxServer.io ecosystem to minimise space usage, down time and bandwidth
* regular security updates
If you want to comment\contribute on this container , are looking for support on any of our other work , or are curious about us in general, check out the following.
Find us at:
* [Discord](https://discord.gg/YWrKVTn) - realtime support / chat with the community and the team.
* [IRC](https://irc.linuxserver.io) - on freenode at `#linuxserver.io`. Our primary support channel is Discord.
* [Blog](https://blog.linuxserver.io) - all the things you can do with our containers including How-To guides, opinions and much more!
* [Podcast](https://anchor.fm/linuxserverio) - on hiatus. Coming back soon (late 2018).
* [forum.linuxserver.io][forumurl]
* [IRC][ircurl] on freenode at `#linuxserver.io`
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
# PSA: Changes are happening
From August 2018 onwards, Linuxserver are in the midst of switching to a new CI platform which will enable us to build and release multiple architectures under a single repo. To this end, existing images for `arm64` and `armhf` builds are being deprecated. They are replaced by a manifest file in each container which automatically pulls the correct image for your architecture. You'll also be able to pull based on a specific architecture tag.
TLDR: Multi-arch support is changing from multiple repos to one repo per container image.
# [linuxserver/heimdall](https://github.com/linuxserver/docker-heimdall)
[![](https://img.shields.io/discord/354974912613449730.svg?logo=discord&label=LSIO%20Discord&style=flat-square)](https://discord.gg/YWrKVTn)
[![](https://images.microbadger.com/badges/version/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com")
[![](https://images.microbadger.com/badges/image/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com")
![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/heimdall.svg)
![Docker Stars](https://img.shields.io/docker/stars/linuxserver/heimdall.svg)
[Heimdall](https://heimdall.site) is a way to organise all those links to your most used web sites and web applications in a simple way.
Simplicity is the key to Heimdall.
Why not use it as your browser start page? It even has the ability to include a search bar using either Google, Bing or DuckDuckGo.
[![heimdall](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/heimdall-banner.png)](https://heimdall.site)
## Supported Architectures
Our images support multiple architectures such as `X86-64`, `arm64` and `armhf`. We utilise the docker manifest for multi-platform awareness. More information is available from docker [here](https://github.com/docker/distribution/blob/master/docs/spec/manifest-v2-2.md#manifest-list).
The architectures supported by this image are:
| Architecture | Tag |
| :----: | --- |
| X86-64 | amd64-latest |
| arm64 | arm64v8-latest |
| armhf | arm32v6-latest |
## Usage
Here are some example snippets to help you get started creating a container.
### docker
```
docker create \
--name=heimdall \
-e PUID=1001 \
-e PGID=1001 \
-e TZ=Europe/London \
-p 80:80 \
-p 443:443 \
-v </path/to/appdata/config>:/config \
--restart unless-stopped
linuxserver/heimdall
```
Using tags, you can switch between the stable releases of Heimdall and the master branch. No tag is required for the latest stable release.
Add the development tag, if required, to the linuxserver/heimdall line of the run/create command in the following format, linuxserver/heimdall:development
The development tag will be the latest commit in the master branch of Heimdall.
HOWEVER , USE THE DEVELOPMENT TAG AT YOUR OWN PERIL !!!!!!!!!
### docker-compose
Compatible with docker-compose v2 schemas.
```
---
version: "2"
services:
heimdall:
image: linuxserver/heimdall
container_name: heimdall
environment:
- PUID=1001
- PGID=1001
- TZ=Europe/London
volumes:
- </path/to/appdata/config>:/config
ports:
- 80:80
- 443:443
mem_limit: 4096m
restart: unless-stopped
```
## Parameters
Container images are configured using parameters passed at runtime (such as those above). These parameters are separated by a colon and indicate `<external>:<internal>` respectively. For example, `-p 8080:80` would expose port `80` from inside the container to be accessible from the host's IP on port `8080` outside the container.
| Parameter | Function |
| :----: | --- |
| `-p 80` | http gui |
| `-p 443` | https gui |
| `-e PUID=1001` | for UserID - see below for explanation |
| `-e PGID=1001` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London |
| `-v /config` | Contains all relevant configuration files. |
## User / Group Identifiers
When using volumes (`-v` flags) permissions issues can arise between the host OS and the container, we avoid this issue by allowing you to specify the user `PUID` and group `PGID`.
Ensure any volume directories on the host are owned by the same user you specify and any permissions issues will vanish like magic.
In this instance `PUID=1001` and `PGID=1001`, to find yours use `id user` as below:
```
$ id username
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
```
&nbsp;
## Application Setup
Access the web gui at http://SERVERIP:PORT
### Adding password protection
This image now supports password protection through htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it heimdall htpasswd -c /config/nginx/.htpasswd <username>`. Replace <username> with a username of your choice and you will be asked to enter a password. New installs will automatically pick it up and implement password protected access. Existing users updating their image can delete their site config at `/config/nginx/site-confs/default` and restart the container after updating the image. A new site config with htpasswd support will be created in its place.
## Support Info
* Shell access whilst the container is running: `docker exec -it heimdall /bin/bash`
* To monitor the logs of the container in realtime: `docker logs -f heimdall`
* container version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' heimdall`
* image version number
* `docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/heimdall`
## Versions
* **04.11.18:** - Add php7-zip.
* **31.10.18:** - Add queue service.
* **17.10.18:** - Symlink avatars folder.
* **16.10.18:** - Updated fastcgi_params for user login support.
* **07.10.18:** - Symlink `.env` rather than copy. It now resides under `/config/www`
* **30.09.18:** - Multi-arch image. Move `.env` to `/config`.
* **05.09.18:** - Rebase to alpine linux 3.8.
* **06.03.18:** - Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place
* **12.02.18:** - Initial Release.

View File

@@ -1,86 +0,0 @@
[linuxserverurl]: https://linuxserver.io
[forumurl]: https://forum.linuxserver.io
[ircurl]: https://www.linuxserver.io/irc/
[podcasturl]: https://www.linuxserver.io/podcast/
[appurl]: https://github.com/linuxserver/Heimdall
[hub]: https://hub.docker.com/r/linuxserver/heimdall/
[![linuxserver.io](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_medium.png)][linuxserverurl]
The [LinuxServer.io][linuxserverurl] team brings you another container release featuring easy user mapping and community support. Find us for support at:
* [forum.linuxserver.io][forumurl]
* [IRC][ircurl] on freenode at `#linuxserver.io`
* [Podcast][podcasturl] covers everything to do with getting the most from your Linux Server plus a focus on all things Docker and containerisation!
# linuxserver/heimdall
[![](https://images.microbadger.com/badges/version/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own version badge on microbadger.com")[![](https://images.microbadger.com/badges/image/linuxserver/heimdall.svg)](https://microbadger.com/images/linuxserver/heimdall "Get your own image badge on microbadger.com")[![Docker Pulls](https://img.shields.io/docker/pulls/linuxserver/heimdall.svg)][hub][![Docker Stars](https://img.shields.io/docker/stars/linuxserver/heimdall.svg)][hub][![Build Status](https://ci.linuxserver.io/buildStatus/icon?job=Docker-Builders/x86-64/x86-64-heimdall)](https://ci.linuxserver.io/job/Docker-Builders/job/x86-64/job/x86-64-heimdall/)
Heimdall is a way to organise all those links to your most used web sites and web applications in a simple way.
Simplicity is the key to Heimdall.
Why not use it as your browser start page? It even has the ability to include a search bar using either Google, Bing or DuckDuckGo.
[![nginx](https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-banner.png)][appurl]
## Usage
```
docker create \
--name=heimdall \
-v <path to data>:/config \
-e PGID=<gid> -e PUID=<uid> \
-p 80:80 -p 443:443 \
-e TZ=<timezone> \
linuxserver/heimdall
```
## Parameters
`The parameters are split into two halves, separated by a colon, the left hand side representing the host and the right the container side.
For example with a port -p external:internal - what this shows is the port mapping from internal to external of the container.
So -p 8080:80 would expose port 80 from inside the container to be accessible from the host's IP on port 8080
http://192.168.x.x:8080 would show you what's running INSIDE the container on port 80.`
* `-p 80` - The web-services.
* `-p 443` - The SSL-Based Webservice
* `-v /config` - Contains your www content and all relevant configuration files.
* `-e PGID` for GroupID - see below for explanation
* `-e PUID` for UserID - see below for explanation
* `-e TZ` - timezone ie. `America/New_York`
* `-e BASEURL` - _optional_ - you can set a base url through this variable to serve the app at http://SERVERIP:PORT/BASEURL
It is based on alpine linux with s6 overlay, for shell access whilst the container is running do `docker exec -it heimdall /bin/bash`.
### User / Group Identifiers
Sometimes when using data volumes (`-v` flags) permissions issues can arise between the host OS and the container. We avoid this issue by allowing you to specify the user `PUID` and group `PGID`. Ensure the data volume directory on the host is owned by the same user you specify and it will "just work" ™.
In this instance `PUID=1001` and `PGID=1001`. To find yours use `id user` as below:
```
$ id <dockeruser>
uid=1001(dockeruser) gid=1001(dockergroup) groups=1001(dockergroup)
```
## Setting up the application
Access the web gui at http://SERVERIP:PORT
## Info
* To monitor the logs of the container in realtime `docker logs -f heimdall`.
* container version number
`docker inspect -f '{{ index .Config.Labels "build_version" }}' heimdall`
* image version number
`docker inspect -f '{{ index .Config.Labels "build_version" }}' linuxserver/heimdall`
## Versions
+ **XX.02.18:** Intial Release.

68
package_versions.txt Normal file
View File

@@ -0,0 +1,68 @@
musl musl-1.1.19-r10
busybox busybox-1.28.4-r1
alpine-baselayout alpine-baselayout-3.1.0-r0
alpine-keys alpine-keys-2.1-r1
libressl2.7-libcrypto libressl2.7-libcrypto-2.7.4-r0
libressl2.7-libssl libressl2.7-libssl-2.7.4-r0
libressl2.7-libtls libressl2.7-libtls-2.7.4-r0
ssl_client ssl_client-1.28.4-r1
zlib zlib-1.2.11-r1
apk-tools apk-tools-2.10.1-r0
scanelf scanelf-1.2.3-r0
musl-utils musl-utils-1.1.19-r10
libc-utils libc-utils-0.7.1-r0
xz-libs xz-libs-5.2.4-r0
xz xz-5.2.4-r0
ca-certificates ca-certificates-20171114-r3
ncurses-terminfo-base ncurses-terminfo-base-6.1_p20180818-r1
ncurses-terminfo ncurses-terminfo-6.1_p20180818-r1
ncurses-libs ncurses-libs-6.1_p20180818-r1
readline readline-7.0.003-r0
bash bash-4.4.19-r1
libattr libattr-2.4.47-r7
libacl libacl-2.2.52-r5
coreutils coreutils-8.29-r2
linux-pam linux-pam-1.3.0-r0
shadow shadow-4.5-r0
tzdata tzdata-2018f-r0
libuuid libuuid-2.32-r0
apr apr-1.6.3-r1
expat expat-2.2.5-r0
apr-util apr-util-1.6.1-r2
apache2-utils apache2-utils-2.4.35-r0
nghttp2-libs nghttp2-libs-1.32.0-r0
libssh2 libssh2-1.8.0-r3
libcurl libcurl-7.61.1-r0
pcre2 pcre2-10.31-r0
git git-2.18.1-r0
popt popt-1.16-r7
logrotate logrotate-3.14.0-r0
libmagic libmagic-5.32-r0
nano nano-2.9.8-r0
pcre pcre-8.42-r0
nginx nginx-1.14.0-r1
libcrypto1.0 libcrypto1.0-1.0.2p-r0
libssl1.0 libssl1.0-1.0.2p-r0
openssl openssl-1.0.2p-r0
php7-common php7-common-7.2.10-r0
libedit libedit-20170329.3.1-r3
libxml2 libxml2-2.9.8-r1
php7 php7-7.2.10-r0
php7-fileinfo php7-fileinfo-7.2.10-r0
php7-fpm php7-fpm-7.2.10-r0
php7-json php7-json-7.2.10-r0
php7-mbstring php7-mbstring-7.2.10-r0
php7-openssl php7-openssl-7.2.10-r0
php7-session php7-session-7.2.10-r0
php7-simplexml php7-simplexml-7.2.10-r0
php7-xml php7-xml-7.2.10-r0
php7-xmlwriter php7-xmlwriter-7.2.10-r0
curl curl-7.61.1-r0
php7-ctype php7-ctype-7.2.10-r0
php7-pdo php7-pdo-7.2.10-r0
sqlite-libs sqlite-libs-3.24.0-r0
php7-pdo_sqlite php7-pdo_sqlite-7.2.10-r0
php7-tokenizer php7-tokenizer-7.2.10-r0
libzip libzip-1.5.1-r1
php7-zip php7-zip-7.2.10-r0
tar tar-1.30-r0

63
readme-vars.yml Normal file
View File

@@ -0,0 +1,63 @@
---
# project information
project_name: heimdall
project_url: "https://heimdall.site"
project_logo: "https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/heimdall-banner.png"
project_blurb: "[{{ project_name|capitalize }}]({{ project_url }}) is a way to organise all those links to your most used web sites and web applications in a simple way.
Simplicity is the key to Heimdall.
Why not use it as your browser start page? It even has the ability to include a search bar using either Google, Bing or DuckDuckGo."
project_lsio_github_repo_url: "https://github.com/linuxserver/docker-{{ project_name }}"
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "amd64-latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_armhf }}", tag: "arm32v6-latest"}
# container parameters
common_param_env_vars_enabled: true
param_container_name: "{{ project_name }}"
param_usage_include_vols: true
param_volumes:
- { vol_path: "/config", vol_host_path: "</path/to/appdata/config>", desc: "Contains all relevant configuration files." }
param_usage_include_ports: true
param_ports:
- { external_port: "80", internal_port: "80", port_desc: "http gui" }
- { external_port: "443", internal_port: "443", port_desc: "https gui" }
param_usage_include_env: true
param_env_vars:
- { env_var: "TZ", env_value: "Europe/London", desc: "Specify a timezone to use EG Europe/London"}
# optional parameters
optional_block_1: true
optional_block_1_items:
- |
Using tags, you can switch between the stable releases of Heimdall and the master branch. No tag is required for the latest stable release.
Add the development tag, if required, to the linuxserver/heimdall line of the run/create command in the following format, linuxserver/heimdall:development
The development tag will be the latest commit in the master branch of Heimdall.
HOWEVER , USE THE DEVELOPMENT TAG AT YOUR OWN PERIL !!!!!!!!!
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Access the web gui at http://SERVERIP:PORT
### Adding password protection
This image now supports password protection through htpasswd. Run the following command on your host to generate the htpasswd file `docker exec -it heimdall htpasswd -c /config/nginx/.htpasswd <username>`. Replace <username> with a username of your choice and you will be asked to enter a password. New installs will automatically pick it up and implement password protected access. Existing users updating their image can delete their site config at `/config/nginx/site-confs/default` and restart the container after updating the image. A new site config with htpasswd support will be created in its place.
# changelog
changelogs:
- { date: "04.11.18:", desc: "Add php7-zip." }
- { date: "31.10.18:", desc: "Add queue service." }
- { date: "17.10.18:", desc: "Symlink avatars folder." }
- { date: "16.10.18:", desc: "Updated fastcgi_params for user login support." }
- { date: "07.10.18:", desc: "Symlink `.env` rather than copy. It now resides under `/config/www`" }
- { date: "30.09.18:", desc: "Multi-arch image. Move `.env` to `/config`." }
- { date: "05.09.18:", desc: "Rebase to alpine linux 3.8." }
- { date: "06.03.18:", desc: "Use password protection if htpasswd is set. Existing users can delete their default site config at /config/nginx/site-confs/default and restart the container, a new default site config with htpasswd support will be created in its place" }
- { date: "12.02.18:", desc: "Initial Release." }

View File

@@ -1,3 +1,5 @@
## Version 2018/03/06 - Changelog: https://github.com/linuxserver/docker-heimdall/commits/master/root/defaults/default
server {
listen 80 default_server;
@@ -12,10 +14,21 @@ server {
ssl_certificate_key /config/keys/cert.key;
client_max_body_size 0;
error_page 599 = @noauth;
location / {
try_files $uri $uri/ /index.php?$args;
}
location / {
if (!-f /config/nginx/.htpasswd) {
return 599;
}
auth_basic "Restricted";
auth_basic_user_file /config/nginx/.htpasswd;
try_files $uri $uri/ /index.php?$args;
}
location @noauth {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;

View File

@@ -1,15 +1,24 @@
#!/usr/bin/with-contenv bash
# create folders
# make our folders
mkdir -p \
/config/www/{backgrounds,icons}
/config/www/{backgrounds,icons,avatars,SupportedApps}
# symlink user config
# copy .env if not exists
[[ ! -f /config/www/.env ]] && \
cp /var/www/localhost/heimdall/.env /config/www/.env
# set queue driver to database
sed -i 's/QUEUE_DRIVER=sync/QUEUE_DRIVER=database/' /config/www/.env
# create symlinks
symlinks=( \
/var/www/localhost/heimdall/storage/app/public/avatars \
/var/www/localhost/heimdall/storage/app/public/backgrounds \
/var/www/localhost/heimdall/storage/app/public/icons \
/var/www/localhost/heimdall/database/app.sqlite )
/var/www/localhost/heimdall/app/SupportedApps \
/var/www/localhost/heimdall/database/app.sqlite \
/var/www/localhost/heimdall/.env )
for i in "${symlinks[@]}"
do

View File

@@ -0,0 +1,4 @@
#!/usr/bin/with-contenv bash
exec \
s6-setuidgid abc php /var/www/localhost/heimdall/artisan queue:work database --sleep=3 --tries=3