Skip to content

Commit 1af3190

Browse files
authored
Merge pull request #7 from linuxserver/arch
rebase to arch to support arm drop IPC caps
2 parents 9f54391 + a4705f5 commit 1af3190

File tree

10 files changed

+98
-49
lines changed

10 files changed

+98
-49
lines changed

.github/workflows/external_trigger.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
fi
1919
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_MYSQL_WORKBENCH_MASTER\". ****"
2020
echo "**** Retrieving external version ****"
21-
EXT_RELEASE=$(curl -sL https://dev.mysql.com/downloads/workbench/ |awk '/<h1>MySQL Workbench/ {print $3;exit}')
21+
EXT_RELEASE=$(curl -sL https://archlinux.org/packages/community/x86_64/mysql-workbench/json/ | jq -r '.pkgver')
2222
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2323
echo "**** Can't retrieve external version, exiting ****"
2424
FAILURE_REASON="Can't retrieve external version for mysql-workbench branch master"
@@ -36,10 +36,15 @@ jobs:
3636
token=$(curl -sX GET \
3737
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fmysql-workbench%3Apull" \
3838
| jq -r '.token')
39-
digest=$(curl -s \
39+
multidigest=$(curl -s \
4040
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
4141
--header "Authorization: Bearer ${token}" \
4242
"https://ghcr.io/v2/${image}/manifests/${tag}" \
43+
| jq -r 'first(.manifests[].digest)')
44+
digest=$(curl -s \
45+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
46+
--header "Authorization: Bearer ${token}" \
47+
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
4348
| jq -r '.config.digest')
4449
image_info=$(curl -sL \
4550
--header "Authorization: Bearer ${token}" \

Dockerfile

Lines changed: 9 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal
1+
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arch
22

33
# set version label
44
ARG BUILD_DATE
@@ -7,46 +7,21 @@ ARG WORKBENCH_VERSION
77
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
88
LABEL maintainer="thelamer"
99

10+
# title
11+
ENV TITLE=MySQLWorkbench
12+
1013
RUN \
11-
echo "**** install packages ****" && \
12-
apt-get update && \
13-
apt-get install -y \
14-
gnome-keyring \
15-
libatkmm-1.6-1v5 \
16-
libcairomm-1.0-1v5 \
17-
libglibmm-2.4-1v5 \
18-
libgtk2.0-0 \
19-
libgtkmm-3.0-1v5 \
20-
libmysqlclient21 \
21-
libopengl0 \
22-
libpangomm-1.4-1v5 \
23-
libpcrecpp0v5 \
24-
libproj15 \
25-
libpython3.8 \
26-
libsecret-1-0 \
27-
libsigc++-2.0-0v5 \
28-
libssh-4 \
29-
libvsqlitepp3v5 \
30-
libzip5 && \
31-
echo "**** install mysql workbench ****" && \
32-
if [ -z ${WORKBENCH_VERSION+x} ]; then \
33-
WORKBENCH_VERSION=$(curl -sL https://dev.mysql.com/downloads/workbench/ \
34-
|awk '/<h1>MySQL Workbench/ {print $3;exit}'); \
35-
fi && \
36-
curl -Lf -o \
37-
/tmp/workbench.deb \
38-
https://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community_${WORKBENCH_VERSION}-1ubuntu20.04_amd64.deb && \
39-
dpkg -i /tmp/workbench.deb && \
14+
echo "**** install runtime packages ****" && \
15+
pacman -Sy --noconfirm --needed \
16+
mysql-workbench && \
4017
echo "**** cleanup ****" && \
41-
apt-get clean && \
4218
rm -rf \
4319
/tmp/* \
44-
/var/lib/apt/lists/* \
45-
/var/tmp/*
20+
/var/cache/pacman/pkg/* \
21+
/var/lib/pacman/sync/*
4622

4723
# add local files
4824
COPY /root /
4925

5026
# ports and volumes
5127
EXPOSE 3000
52-
VOLUME /config

Dockerfile.aarch64

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-arch
2+
3+
# set version label
4+
ARG BUILD_DATE
5+
ARG VERSION
6+
ARG WORKBENCH_VERSION
7+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8+
LABEL maintainer="thelamer"
9+
10+
# title
11+
ENV TITLE=MySQLWorkbench
12+
13+
RUN \
14+
echo "**** install runtime packages ****" && \
15+
pacman -Sy --noconfirm --needed \
16+
mysql-workbench && \
17+
echo "**** cleanup ****" && \
18+
rm -rf \
19+
/tmp/* \
20+
/var/cache/pacman/pkg/* \
21+
/var/lib/pacman/sync/*
22+
23+
# add local files
24+
COPY /root /
25+
26+
# ports and volumes
27+
EXPOSE 3000

Dockerfile.armhf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-arch
2+
3+
# set version label
4+
ARG BUILD_DATE
5+
ARG VERSION
6+
ARG WORKBENCH_VERSION
7+
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
8+
LABEL maintainer="thelamer"
9+
10+
# title
11+
ENV TITLE=MySQLWorkbench
12+
13+
RUN \
14+
echo "**** install runtime packages ****" && \
15+
pacman -Sy --noconfirm --needed \
16+
mysql-workbench && \
17+
echo "**** cleanup ****" && \
18+
rm -rf \
19+
/tmp/* \
20+
/var/cache/pacman/pkg/* \
21+
/var/lib/pacman/sync/*
22+
23+
# add local files
24+
COPY /root /
25+
26+
# ports and volumes
27+
EXPOSE 3000

Jenkinsfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ pipeline {
2424
DOCKERHUB_IMAGE = 'linuxserver/mysql-workbench'
2525
DEV_DOCKERHUB_IMAGE = 'lsiodev/mysql-workbench'
2626
PR_DOCKERHUB_IMAGE = 'lspipepr/mysql-workbench'
27-
DIST_IMAGE = 'ubuntu'
28-
MULTIARCH = 'false'
27+
DIST_IMAGE = 'arch'
28+
MULTIARCH = 'true'
2929
CI = 'true'
3030
CI_WEB = 'true'
3131
CI_PORT = '3000'
@@ -104,7 +104,7 @@ pipeline {
104104
steps{
105105
script{
106106
env.EXT_RELEASE = sh(
107-
script: ''' curl -sL https://dev.mysql.com/downloads/workbench/ |awk '/<h1>MySQL Workbench/ {print $3;exit}' ''',
107+
script: ''' curl -sL https://archlinux.org/packages/community/x86_64/mysql-workbench/json/ | jq -r '.pkgver' ''',
108108
returnStdout: true).trim()
109109
env.RELEASE_LINK = 'custom_command'
110110
}

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Find us at:
4646

4747
## Supported Architectures
4848

49-
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) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
49+
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) and our announcement [here](https://blog.linuxserver.io/2019/02/21/the-lsio-pipeline-project/).
5050

5151
Simply pulling `lscr.io/linuxserver/mysql-workbench` should retrieve the correct image for your arch, but you can also pull specific arch images via tags.
5252

@@ -55,6 +55,8 @@ The architectures supported by this image are:
5555
| Architecture | Tag |
5656
| :----: | --- |
5757
| x86-64 | latest |
58+
| arm64 | arm64v8-latest |
59+
| armhf | arm32v7-latest |
5860

5961
## Application Setup
6062

@@ -87,8 +89,6 @@ services:
8789
- /path/to/config:/config
8890
ports:
8991
- 3000:3000
90-
cap_add:
91-
- IPC_LOCK
9292
restart: unless-stopped
9393
```
9494
@@ -102,7 +102,6 @@ docker run -d \
102102
-e TZ=Europe/London \
103103
-p 3000:3000 \
104104
-v /path/to/config:/config \
105-
--cap-add="IPC_LOCK" \
106105
--restart unless-stopped \
107106
lscr.io/linuxserver/mysql-workbench
108107
```
@@ -118,7 +117,6 @@ Container images are configured using parameters passed at runtime (such as thos
118117
| `-e PGID=1000` | for GroupID - see below for explanation |
119118
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
120119
| `-v /config` | Users home directory in the container, stores program settings. |
121-
| `--cap-add=` | Required for keyring functionality |
122120

123121
## Environment variables from files (Docker secrets)
124122

@@ -229,6 +227,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
229227

230228
## Versions
231229

230+
* **15.02.22:** - Rebase to Arch.
232231
* **20.04.21:** - Rebase on focal.
233232
* **18.01.21:** - Update libpython dependency.
234233
* **26.03.20:** - Initial release.

jenkins-vars.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# jenkins variables
44
project_name: docker-mysql-workbench
55
external_type: na
6-
custom_version_command: "curl -sL https://dev.mysql.com/downloads/workbench/ |awk '/<h1>MySQL Workbench/ {print $3;exit}'"
6+
custom_version_command: curl -sL https://archlinux.org/packages/community/x86_64/mysql-workbench/json/ | jq -r '.pkgver'
77
release_type: stable
88
release_tag: latest
99
ls_branch: master
@@ -15,8 +15,8 @@ repo_vars:
1515
- DOCKERHUB_IMAGE = 'linuxserver/mysql-workbench'
1616
- DEV_DOCKERHUB_IMAGE = 'lsiodev/mysql-workbench'
1717
- PR_DOCKERHUB_IMAGE = 'lspipepr/mysql-workbench'
18-
- DIST_IMAGE = 'ubuntu'
19-
- MULTIARCH = 'false'
18+
- DIST_IMAGE = 'arch'
19+
- MULTIARCH = 'true'
2020
- CI = 'true'
2121
- CI_WEB = 'true'
2222
- CI_PORT = '3000'

readme-vars.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ project_blurb_optional_extras_enabled: false
1111
# supported architectures
1212
available_architectures:
1313
- { arch: "{{ arch_x86_64 }}", tag: "latest"}
14+
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
15+
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}
1416

1517
# development version
1618
development_versions: false
@@ -27,8 +29,6 @@ param_volumes:
2729
param_usage_include_ports: true
2830
param_ports:
2931
- { external_port: "3000", internal_port: "3000", port_desc: "Mysql Workbench desktop gui." }
30-
custom_params:
31-
- { name: "cap-add", name_compose: "cap_add", value: ["IPC_LOCK"], desc: "Required for keyring functionality", array: "true" }
3232
# application setup block
3333
app_setup_block_enabled: true
3434
app_setup_block: |
@@ -42,6 +42,7 @@ app_setup_block: |
4242
4343
# changelog
4444
changelogs:
45+
- { date: "15.02.22:", desc: "Rebase to Arch." }
4546
- { date: "20.04.21:", desc: "Rebase on focal." }
4647
- { date: "18.01.21:", desc: "Update libpython dependency." }
4748
- { date: "26.03.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="MySQL WB" icon="/usr/share/icons/hicolor/48x48/apps/mysql-workbench.png"><action name="Execute"><command>/usr/sbin/mysql-workbench</command></action></item>
6+
<item label="Reload OB"><action name="Reconfigure"/></item>
7+
</menu>
8+
</openbox_menu>
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)