Skip to content

Commit 4042eda

Browse files
authored
Merge pull request #3 from linuxserver/alpine
rebase to alpine
2 parents c954d56 + 8912331 commit 4042eda

File tree

10 files changed

+67
-79
lines changed

10 files changed

+67
-79
lines changed

.github/workflows/external_trigger.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ jobs:
1818
fi
1919
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_SQLITEBROWSER_MASTER\". ****"
2020
echo "**** Retrieving external version ****"
21-
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}')
21+
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
22+
&& awk '/^P:'"sqlitebrowser"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
2223
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2324
echo "**** Can't retrieve external version, exiting ****"
2425
FAILURE_REASON="Can't retrieve external version for sqlitebrowser branch master"

Dockerfile

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:bionic
1+
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:alpine
22

33
# set version label
44
ARG BUILD_DATE
@@ -7,28 +7,16 @@ ARG SQLITEB_VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="aptalca"
99

10+
# title
11+
ENV TITLE=SQLiteBrowser
12+
1013
RUN \
11-
echo "***** add ppa ****" && \
12-
apt-get update && \
13-
apt-get install -y \
14-
gnupg && \
15-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 941353830DA80B6A06276736B0C3F48A7F2583EA && \
16-
echo "deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
17-
echo "deb-src http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
18-
if [ -z ${SQLITEB_VERSION+x} ]; then \
19-
SQLITEB_VERSION=$(curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c \
20-
|grep -A 7 -m 1 "Package: sqlitebrowser" | awk -F ": " '/Version/{print $2;exit}');\
21-
fi && \
22-
echo "**** install packages ****" && \
23-
apt-get update && \
24-
apt-get install -y \
25-
sqlitebrowser=${SQLITEB_VERSION} && \
26-
echo "**** cleanup ****" && \
27-
apt-get clean && \
28-
rm -rf \
29-
/tmp/* \
30-
/var/lib/apt/lists/* \
31-
/var/tmp/*
14+
echo "**** install packages ****" && \
15+
apk add --no-cache \
16+
sqlitebrowser && \
17+
echo "**** cleanup ****" && \
18+
rm -rf \
19+
/tmp/*
3220

3321
# add local files
3422
COPY /root /

Dockerfile.aarch64

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-bionic
1+
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-alpine
22

33
# set version label
44
ARG BUILD_DATE
@@ -7,28 +7,16 @@ ARG SQLITEB_VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="aptalca"
99

10+
# title
11+
ENV TITLE=SQLiteBrowser
12+
1013
RUN \
11-
echo "***** add ppa ****" && \
12-
apt-get update && \
13-
apt-get install -y \
14-
gnupg && \
15-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 941353830DA80B6A06276736B0C3F48A7F2583EA && \
16-
echo "deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
17-
echo "deb-src http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
18-
if [ -z ${SQLITEB_VERSION+x} ]; then \
19-
SQLITEB_VERSION=$(curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c \
20-
|grep -A 7 -m 1 "Package: sqlitebrowser" | awk -F ": " '/Version/{print $2;exit}');\
21-
fi && \
22-
echo "**** install packages ****" && \
23-
apt-get update && \
24-
apt-get install -y \
25-
sqlitebrowser=${SQLITEB_VERSION} && \
26-
echo "**** cleanup ****" && \
27-
apt-get clean && \
28-
rm -rf \
29-
/tmp/* \
30-
/var/lib/apt/lists/* \
31-
/var/tmp/*
14+
echo "**** install packages ****" && \
15+
apk add --no-cache \
16+
sqlitebrowser && \
17+
echo "**** cleanup ****" && \
18+
rm -rf \
19+
/tmp/*
3220

3321
# add local files
3422
COPY /root /

Dockerfile.armhf

Lines changed: 10 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-bionic
1+
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-alpine
22

33
# set version label
44
ARG BUILD_DATE
@@ -7,28 +7,16 @@ ARG SQLITEB_VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="aptalca"
99

10+
# title
11+
ENV TITLE=SQLiteBrowser
12+
1013
RUN \
11-
echo "***** add ppa ****" && \
12-
apt-get update && \
13-
apt-get install -y \
14-
gnupg && \
15-
apt-key adv --keyserver hkp://keyserver.ubuntu.com:11371 --recv-keys 941353830DA80B6A06276736B0C3F48A7F2583EA && \
16-
echo "deb http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
17-
echo "deb-src http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu bionic main" >> /etc/apt/sources.list.d/sqlitebrowser.list && \
18-
if [ -z ${SQLITEB_VERSION+x} ]; then \
19-
SQLITEB_VERSION=$(curl -sX GET http://ppa.launchpad.net/linuxgndu/sqlitebrowser/ubuntu/dists/bionic/main/binary-amd64/Packages.gz | gunzip -c \
20-
|grep -A 7 -m 1 "Package: sqlitebrowser" | awk -F ": " '/Version/{print $2;exit}');\
21-
fi && \
22-
echo "**** install packages ****" && \
23-
apt-get update && \
24-
apt-get install -y \
25-
sqlitebrowser=${SQLITEB_VERSION} && \
26-
echo "**** cleanup ****" && \
27-
apt-get clean && \
28-
rm -rf \
29-
/tmp/* \
30-
/var/lib/apt/lists/* \
31-
/var/tmp/*
14+
echo "**** install packages ****" && \
15+
apk add --no-cache \
16+
sqlitebrowser && \
17+
echo "**** cleanup ****" && \
18+
rm -rf \
19+
/tmp/*
3220

3321
# add local files
3422
COPY /root /

Jenkinsfile

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ pipeline {
2424
DOCKERHUB_IMAGE = 'linuxserver/sqlitebrowser'
2525
DEV_DOCKERHUB_IMAGE = 'lsiodev/sqlitebrowser'
2626
PR_DOCKERHUB_IMAGE = 'lspipepr/sqlitebrowser'
27-
DIST_IMAGE = 'ubuntu'
27+
DIST_IMAGE = 'alpine'
28+
DIST_TAG = '3.15'
29+
DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.15/community/'
30+
DIST_REPO_PACKAGES = 'sqlitebrowser'
2831
MULTIARCH='true'
2932
CI='true'
3033
CI_WEB='true'
@@ -99,14 +102,15 @@ pipeline {
99102
/* ########################
100103
External Release Tagging
101104
######################## */
102-
// If this is a custom command to determine version use that command
103-
stage("Set tag custom bash"){
105+
// If this is an alpine repo change for external version determine an md5 from the version string
106+
stage("Set tag Alpine Repo"){
104107
steps{
105108
script{
106109
env.EXT_RELEASE = sh(
107-
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}' ''',
110+
script: '''curl -sL "${DIST_REPO}x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
111+
&& awk '/^P:'"${DIST_REPO_PACKAGES}"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://' ''',
108112
returnStdout: true).trim()
109-
env.RELEASE_LINK = 'custom_command'
113+
env.RELEASE_LINK = 'alpine_repo'
110114
}
111115
}
112116
}
@@ -909,11 +913,11 @@ pipeline {
909913
"tagger": {"name": "LinuxServer Jenkins","email": "[email protected]","date": "'${GITHUB_DATE}'"}}' '''
910914
echo "Pushing New release for Tag"
911915
sh '''#! /bin/bash
912-
echo "Updating to ${EXT_RELEASE_CLEAN}" > releasebody.json
916+
echo "Updating external repo packages to ${EXT_RELEASE_CLEAN}" > releasebody.json
913917
echo '{"tag_name":"'${META_TAG}'",\
914918
"target_commitish": "master",\
915919
"name": "'${META_TAG}'",\
916-
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Remote Changes:**\\n\\n' > start
920+
"body": "**LinuxServer Changes:**\\n\\n'${LS_RELEASE_NOTES}'\\n\\n**Repo Changes:**\\n\\n' > start
917921
printf '","draft": false,"prerelease": false}' >> releasebody.json
918922
paste -d'\\0' start releasebody.json > releasebody.json.done
919923
curl -H "Authorization: token ${GITHUB_TOKEN}" -X POST https://api.github.com/repos/${LS_USER}/${LS_REPO}/releases -d @releasebody.json.done'''

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Container images are configured using parameters passed at runtime (such as thos
108108

109109
| Parameter | Function |
110110
| :----: | --- |
111-
| `-p 3000` | Sqlitebrowser desktop gui, only use this if you are not using host mode and sniffing Docker network traffic. |
111+
| `-p 3000` | Sqlitebrowser desktop gui. |
112112
| `-e PUID=1000` | for UserID - see below for explanation |
113113
| `-e PGID=1000` | for GroupID - see below for explanation |
114114
| `-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
223223

224224
## Versions
225225

226+
* **16.02.22:** - Rebase to Alpine.
226227
* **20.01.21:** - Remove Wireshark reference.
227228
* **29.07.20:** - Initial release.

jenkins-vars.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
# jenkins variables
44
project_name: docker-sqlitebrowser
5-
external_type: na
6-
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}'"
5+
external_type: alpine_repo
76
release_type: stable
87
release_tag: latest
98
ls_branch: master
@@ -15,7 +14,10 @@ repo_vars:
1514
- DOCKERHUB_IMAGE = 'linuxserver/sqlitebrowser'
1615
- DEV_DOCKERHUB_IMAGE = 'lsiodev/sqlitebrowser'
1716
- PR_DOCKERHUB_IMAGE = 'lspipepr/sqlitebrowser'
18-
- DIST_IMAGE = 'ubuntu'
17+
- DIST_IMAGE = 'alpine'
18+
- DIST_TAG = '3.15'
19+
- DIST_REPO = 'http://dl-cdn.alpinelinux.org/alpine/v3.15/community/'
20+
- DIST_REPO_PACKAGES = 'sqlitebrowser'
1921
- MULTIARCH='true'
2022
- CI='true'
2123
- CI_WEB='true'

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ param_volumes:
2828
- { vol_path: "/config", vol_host_path: "/path/to/config", desc: "Users home directory in the container, stores program settings and potentially dump files." }
2929
param_usage_include_ports: true
3030
param_ports:
31-
- { 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." }
31+
- { external_port: "3000", internal_port: "3000", port_desc: "Sqlitebrowser desktop gui." }
3232

3333
# application setup block
3434
app_setup_block_enabled: true
@@ -40,5 +40,6 @@ app_setup_block: |
4040
4141
# changelog
4242
changelogs:
43+
- { date: "16.02.22:", desc: "Rebase to Alpine." }
4344
- { date: "20.01.21:", desc: "Remove Wireshark reference." }
4445
- { date: "29.07.20:", desc: "Initial release." }

root/defaults/menu.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<openbox_menu xmlns="http://openbox.org/3.4/menu">
3+
<menu id="root-menu" label="MENU">
4+
<item label="xterm" icon="/usr/share/pixmaps/xterm-color_48x48.xpm"><action name="Execute"><command>/usr/bin/xterm</command></action></item>
5+
<item label="SQLite Browser" icon="/usr/share/icons/hicolor/256x256/apps/sqlitebrowser.png"><action name="Execute"><command>/usr/bin/sqlitebrowser</command></action></item>
6+
<item label="Reload OB"><action name="Reconfigure"/></item>
7+
</menu>
8+
</openbox_menu>

root/etc/cont-init.d/56-openboxcopy

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/with-contenv bash
2+
3+
# default file copies first run
4+
[[ ! -f /config/.config/openbox/menu.xml ]] && \
5+
mkdir -p /config/.config/openbox && \
6+
cp /defaults/menu.xml /config/.config/openbox/menu.xml && \
7+
chown -R abc:abc /config/.config

0 commit comments

Comments
 (0)