Skip to content

rebase to arch to support arm drop IPC caps #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/external_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fi
echo "**** External trigger running off of master branch. To disable this trigger, set a Github secret named \"PAUSE_EXTERNAL_TRIGGER_MYSQL_WORKBENCH_MASTER\". ****"
echo "**** Retrieving external version ****"
EXT_RELEASE=$(curl -sL https://dev.mysql.com/downloads/workbench/ |awk '/<h1>MySQL Workbench/ {print $3;exit}')
EXT_RELEASE=$(curl -sL https://archlinux.org/packages/community/x86_64/mysql-workbench/json/ | jq -r '.pkgver')
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
echo "**** Can't retrieve external version, exiting ****"
FAILURE_REASON="Can't retrieve external version for mysql-workbench branch master"
Expand All @@ -36,10 +36,15 @@ jobs:
token=$(curl -sX GET \
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fmysql-workbench%3Apull" \
| jq -r '.token')
digest=$(curl -s \
multidigest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${tag}" \
| jq -r 'first(.manifests[].digest)')
digest=$(curl -s \
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
--header "Authorization: Bearer ${token}" \
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
| jq -r '.config.digest')
image_info=$(curl -sL \
--header "Authorization: Bearer ${token}" \
Expand Down
43 changes: 9 additions & 34 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:focal
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arch

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

# title
ENV TITLE=MySQLWorkbench

RUN \
echo "**** install packages ****" && \
apt-get update && \
apt-get install -y \
gnome-keyring \
libatkmm-1.6-1v5 \
libcairomm-1.0-1v5 \
libglibmm-2.4-1v5 \
libgtk2.0-0 \
libgtkmm-3.0-1v5 \
libmysqlclient21 \
libopengl0 \
libpangomm-1.4-1v5 \
libpcrecpp0v5 \
libproj15 \
libpython3.8 \
libsecret-1-0 \
libsigc++-2.0-0v5 \
libssh-4 \
libvsqlitepp3v5 \
libzip5 && \
echo "**** install mysql workbench ****" && \
if [ -z ${WORKBENCH_VERSION+x} ]; then \
WORKBENCH_VERSION=$(curl -sL https://dev.mysql.com/downloads/workbench/ \
|awk '/<h1>MySQL Workbench/ {print $3;exit}'); \
fi && \
curl -Lf -o \
/tmp/workbench.deb \
https://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community_${WORKBENCH_VERSION}-1ubuntu20.04_amd64.deb && \
dpkg -i /tmp/workbench.deb && \
echo "**** install runtime packages ****" && \
pacman -Sy --noconfirm --needed \
mysql-workbench && \
echo "**** cleanup ****" && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/*

# add local files
COPY /root /

# ports and volumes
EXPOSE 3000
VOLUME /config
27 changes: 27 additions & 0 deletions Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm64v8-arch

# set version label
ARG BUILD_DATE
ARG VERSION
ARG WORKBENCH_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"

# title
ENV TITLE=MySQLWorkbench

RUN \
echo "**** install runtime packages ****" && \
pacman -Sy --noconfirm --needed \
mysql-workbench && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/*

# add local files
COPY /root /

# ports and volumes
EXPOSE 3000
27 changes: 27 additions & 0 deletions Dockerfile.armhf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ghcr.io/linuxserver/baseimage-rdesktop-web:arm32v7-arch

# set version label
ARG BUILD_DATE
ARG VERSION
ARG WORKBENCH_VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="thelamer"

# title
ENV TITLE=MySQLWorkbench

RUN \
echo "**** install runtime packages ****" && \
pacman -Sy --noconfirm --needed \
mysql-workbench && \
echo "**** cleanup ****" && \
rm -rf \
/tmp/* \
/var/cache/pacman/pkg/* \
/var/lib/pacman/sync/*

# add local files
COPY /root /

# ports and volumes
EXPOSE 3000
6 changes: 3 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ pipeline {
DOCKERHUB_IMAGE = 'linuxserver/mysql-workbench'
DEV_DOCKERHUB_IMAGE = 'lsiodev/mysql-workbench'
PR_DOCKERHUB_IMAGE = 'lspipepr/mysql-workbench'
DIST_IMAGE = 'ubuntu'
MULTIARCH = 'false'
DIST_IMAGE = 'arch'
MULTIARCH = 'true'
CI = 'true'
CI_WEB = 'true'
CI_PORT = '3000'
Expand Down Expand Up @@ -104,7 +104,7 @@ pipeline {
steps{
script{
env.EXT_RELEASE = sh(
script: ''' curl -sL https://dev.mysql.com/downloads/workbench/ |awk '/<h1>MySQL Workbench/ {print $3;exit}' ''',
script: ''' curl -sL https://archlinux.org/packages/community/x86_64/mysql-workbench/json/ | jq -r '.pkgver' ''',
returnStdout: true).trim()
env.RELEASE_LINK = 'custom_command'
}
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Find us at:

## Supported Architectures

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/).
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/).

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.

Expand All @@ -55,6 +55,8 @@ The architectures supported by this image are:
| Architecture | Tag |
| :----: | --- |
| x86-64 | latest |
| arm64 | arm64v8-latest |
| armhf | arm32v7-latest |

## Application Setup

Expand Down Expand Up @@ -87,8 +89,6 @@ services:
- /path/to/config:/config
ports:
- 3000:3000
cap_add:
- IPC_LOCK
restart: unless-stopped
```

Expand All @@ -102,7 +102,6 @@ docker run -d \
-e TZ=Europe/London \
-p 3000:3000 \
-v /path/to/config:/config \
--cap-add="IPC_LOCK" \
--restart unless-stopped \
lscr.io/linuxserver/mysql-workbench
```
Expand All @@ -118,7 +117,6 @@ Container images are configured using parameters passed at runtime (such as thos
| `-e PGID=1000` | for GroupID - see below for explanation |
| `-e TZ=Europe/London` | Specify a timezone to use EG Europe/London. |
| `-v /config` | Users home directory in the container, stores program settings. |
| `--cap-add=` | Required for keyring functionality |

## Environment variables from files (Docker secrets)

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

## Versions

* **15.02.22:** - Rebase to Arch.
* **20.04.21:** - Rebase on focal.
* **18.01.21:** - Update libpython dependency.
* **26.03.20:** - Initial release.
6 changes: 3 additions & 3 deletions jenkins-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# jenkins variables
project_name: docker-mysql-workbench
external_type: na
custom_version_command: "curl -sL https://dev.mysql.com/downloads/workbench/ |awk '/<h1>MySQL Workbench/ {print $3;exit}'"
custom_version_command: curl -sL https://archlinux.org/packages/community/x86_64/mysql-workbench/json/ | jq -r '.pkgver'
release_type: stable
release_tag: latest
ls_branch: master
Expand All @@ -15,8 +15,8 @@ repo_vars:
- DOCKERHUB_IMAGE = 'linuxserver/mysql-workbench'
- DEV_DOCKERHUB_IMAGE = 'lsiodev/mysql-workbench'
- PR_DOCKERHUB_IMAGE = 'lspipepr/mysql-workbench'
- DIST_IMAGE = 'ubuntu'
- MULTIARCH = 'false'
- DIST_IMAGE = 'arch'
- MULTIARCH = 'true'
- CI = 'true'
- CI_WEB = 'true'
- CI_PORT = '3000'
Expand Down
5 changes: 3 additions & 2 deletions readme-vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ project_blurb_optional_extras_enabled: false
# supported architectures
available_architectures:
- { arch: "{{ arch_x86_64 }}", tag: "latest"}
- { arch: "{{ arch_arm64 }}", tag: "arm64v8-latest"}
- { arch: "{{ arch_armhf }}", tag: "arm32v7-latest"}

# development version
development_versions: false
Expand All @@ -27,8 +29,6 @@ param_volumes:
param_usage_include_ports: true
param_ports:
- { external_port: "3000", internal_port: "3000", port_desc: "Mysql Workbench desktop gui." }
custom_params:
- { name: "cap-add", name_compose: "cap_add", value: ["IPC_LOCK"], desc: "Required for keyring functionality", array: "true" }
# application setup block
app_setup_block_enabled: true
app_setup_block: |
Expand All @@ -42,6 +42,7 @@ app_setup_block: |

# changelog
changelogs:
- { date: "15.02.22:", desc: "Rebase to Arch." }
- { date: "20.04.21:", desc: "Rebase on focal." }
- { date: "18.01.21:", desc: "Update libpython dependency." }
- { date: "26.03.20:", desc: "Initial release." }
8 changes: 8 additions & 0 deletions root/defaults/menu.xml
Original file line number Diff line number Diff line change
@@ -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="MySQL WB" icon="/usr/share/icons/hicolor/48x48/apps/mysql-workbench.png"><action name="Execute"><command>/usr/sbin/mysql-workbench</command></action></item>
<item label="Reload OB"><action name="Reconfigure"/></item>
</menu>
</openbox_menu>
7 changes: 7 additions & 0 deletions root/etc/cont-init.d/56-openboxcopy
Original file line number Diff line number Diff line change
@@ -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