Merge pull request #3 from linuxserver/alpine

rebase to alpine
This commit is contained in:
aptalca 2022-02-17 08:23:53 -05:00 committed by GitHub
commit 4042edac71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 67 additions and 79 deletions

View File

@ -18,7 +18,8 @@ jobs:
fi
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SQLITEBROWSER_MASTER\". ****"
echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c |grep -A 7 -m 1 'Package: sqlitebrowser' | awk -F ': ' '/Version/{print $2;exit}')
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"sqlitebrowser"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for sqlitebrowser branch master"

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:bionic
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:alpine
# set version label
ARG BUILD_DATE
@ -7,28 +7,16 @@ ARG SQLITEB_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# title
ENV TITLE=SQLiteBrowser
RUN \
echo "***** add ppa ****" && \
apt-get update && \
apt-get install -y \
gnupg && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 941353830DA80B6A06276736B0C3F48A7F2583EA && \
echo "deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
echo "deb-src http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
if [ -z ${SQLITEB_VERSION+x} ]; then \
SQLITEB_VERSION=$(curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c \
|grep -A 7 -m 1 "Package: sqlitebrowser" | awk -F ": " '/Version/{print $2;exit}');\
fi && \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
sqlitebrowser=${SQLITEB_VERSION} && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
echo "**** install packages ****" && \
apk add --no-cache \
sqlitebrowser && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add local files
COPY /root /

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-bionic
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-alpine
# set version label
ARG BUILD_DATE
@ -7,28 +7,16 @@ ARG SQLITEB_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# title
ENV TITLE=SQLiteBrowser
RUN \
echo "***** add ppa ****" && \
apt-get update && \
apt-get install -y \
gnupg && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 941353830DA80B6A06276736B0C3F48A7F2583EA && \
echo "deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
echo "deb-src http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
if [ -z ${SQLITEB_VERSION+x} ]; then \
SQLITEB_VERSION=$(curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c \
|grep -A 7 -m 1 "Package: sqlitebrowser" | awk -F ": " '/Version/{print $2;exit}');\
fi && \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
sqlitebrowser=${SQLITEB_VERSION} && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
echo "**** install packages ****" && \
apk add --no-cache \
sqlitebrowser && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add local files
COPY /root /

View File

@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-bionic
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-alpine
# set version label
ARG BUILD_DATE
@ -7,28 +7,16 @@ ARG SQLITEB_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="aptalca"
# title
ENV TITLE=SQLiteBrowser
RUN \
echo "***** add ppa ****" && \
apt-get update && \
apt-get install -y \
gnupg && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 941353830DA80B6A06276736B0C3F48A7F2583EA && \
echo "deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
echo "deb-src http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
if [ -z ${SQLITEB_VERSION+x} ]; then \
SQLITEB_VERSION=$(curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c \
|grep -A 7 -m 1 "Package: sqlitebrowser" | awk -F ": " '/Version/{print $2;exit}');\
fi && \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
sqlitebrowser=${SQLITEB_VERSION} && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
echo "**** install packages ****" && \
apk add --no-cache \
sqlitebrowser && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/*
# add local files
COPY /root /

18
Jenkinsfile vendored
View File

@ -24,7 +24,10 @@ pipeline {
DOCKERHUB_IMAGE = 'linuxserver/sqlitebrowser'
DEV_DOCKERHUB_IMAGE = 'lsiodev/sqlitebrowser'
PR_DOCKERHUB_IMAGE = 'lspipepr/sqlitebrowser'
DIST_IMAGE = 'ubuntu'
DIST_IMAGE = 'alpine'
DIST_TAG = '3.15'
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.15/community/'
DIST_REPO_PACKAGES = 'sqlitebrowser'
MULTIARCH='true'
CI='true'
CI_WEB='true'
@ -99,14 +102,15 @@ pipeline {
/* ########################
External Release Tagging
######################## */
// If this is a custom command to determine version use that command
stage("Set tag custom bash"){
// If this is an alpine repo change for external version determine an md5 from the version string
stage("Set tag Alpine Repo"){
steps{
script{
env.EXT_RELEASE = sh(
script: ''' curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c |grep -A 7 -m 1 'Package: sqlitebrowser' | awk -F ': ' '/Version/{print $2;exit}' ''',
script: '''curl -sL "${DIST_REPO}x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
&& awk '/^P:'"${DIST_REPO_PACKAGES}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
env.RELEASE_LINK = 'alpine_repo'
}
}
}
@ -909,11 +913,11 @@ pipeline {
"tagger": {"name": "LinuxServer Jenkins","email": "jenkins@linuxserver.io","date": "'${GITHUB_DATE}'"}}' '''
echo "Pushing New release for Tag"
sh '''#! /bin/bash
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json
echo '{"tag_name":"'${META_TAG}'",\
"target_commitish": "master",\
"name": "'${META_TAG}'",\
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start
printf '","draft": false,"prerelease": false}' >> 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'''

View File

@ -108,7 +108,7 @@ Container images are configured using parameters passed at runtime (such as thos
| Parameter | Function |
| :----: | --- |
| `-p 3000` | Sqlitebrowser desktop gui, only use this if you are not using host mode and sniffing Docker network traffic. |
| `-p 3000` | Sqlitebrowser desktop gui. |
| `-e PUID=1000` | for UserID - see below for explanation |
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
@ -223,5 +223,6 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
## Versions
* **16.02.22:** - Rebase to Alpine.
* **20.01.21:** - Remove Wireshark reference.
* **29.07.20:** - Initial release.

View File

@ -2,8 +2,7 @@
# jenkins variables
project_name: docker-sqlitebrowser
external_type: na
custom_version_command: "curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c |grep -A 7 -m 1 'Package: sqlitebrowser' | awk -F ': ' '/Version/{print $2;exit}'"
external_type: alpine_repo
release_type: stable
release_tag: latest
ls_branch: master
@ -15,7 +14,10 @@ repo_vars:
- DOCKERHUB_IMAGE = 'linuxserver/sqlitebrowser'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/sqlitebrowser'
- PR_DOCKERHUB_IMAGE = 'lspipepr/sqlitebrowser'
- DIST_IMAGE = 'ubuntu'
- DIST_IMAGE = 'alpine'
- DIST_TAG = '3.15'
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.15/community/'
- DIST_REPO_PACKAGES = 'sqlitebrowser'
- MULTIARCH='true'
- CI='true'
- CI_WEB='true'

View File

@ -28,7 +28,7 @@ param_volumes:
- { vol_path: "/config", vol_host_path: "/path/to/config", desc: "Users home directory in the container, stores program settings and potentially dump files." }
param_usage_include_ports: true
param_ports:
- { external_port: "3000", internal_port: "3000", port_desc: "Sqlitebrowser desktop gui, only use this if you are not using host mode and sniffing Docker network traffic." }
- { external_port: "3000", internal_port: "3000", port_desc: "Sqlitebrowser desktop gui." }
# application setup block
app_setup_block_enabled: true
@ -40,5 +40,6 @@ app_setup_block: |
# changelog
changelogs:
- { date: "16.02.22:", desc: "Rebase to Alpine." }
- { date: "20.01.21:", desc: "Remove Wireshark reference." }
- { date: "29.07.20:", desc: "Initial release." }

8
root/defaults/menu.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/3.4/menu">
<menu id="root-menu" label="MENU">
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
<item label="SQLite Browser" icon="/usr/share/icons/hicolor/256x256/apps/sqlitebrowser.png"><action name="Execute"><command>/usr/bin/sqlitebrowser</command></action></item>
<item label="Reload OB"><action name="Reconfigure"/></item>
</menu>
</openbox_menu>

View File

@ -0,0 +1,7 @@
#!/usr/bin/with-contenv bash
# default file copies first run
[[ ! -f /config/.config/openbox/menu.xml ]] && \
mkdir -p /config/.config/openbox && \
cp /defaults/menu.xml /config/.config/openbox/menu.xml && \
chown -R abc:abc /config/.config