A dockerized DBeaver CE desktop application
1.5K

A dockerized DBeaver CE desktop application.
docker pull seudev/dbeaver:7.3.0
DBeaver is a GUI application, then to run it in a docker container is necessary allow access to the X server. Execute the below script to allow it:
if ! grep -q "xhost +local:root" ~/.profile; then
printf "\n# Allow access to the X server, using the local root user\nxhost +local:root\n" >> ~/.profile
xhost +local:root
fi
Note: The xhost +local:root command can be executed directly, without be append to ~./profile file, but this mode is necessary re-execute each system boot.
Run the below script to download and configure the shortcut in your desktop and in the Start Menu.
mkdir -p ~/seudev/dockerized-apps/dbeaver/7.3.0 \
&& wget https://raw.githubusercontent.com/seudev/dockerized-apps/master/dbeaver/dbeaver -O ~/seudev/dockerized-apps/dbeaver/7.3.0/dbeaver \
&& wget https://raw.githubusercontent.com/seudev/dockerized-apps/master/dbeaver/dockerized-dbeaver-256px.png -O ~/seudev/dockerized-apps/dbeaver/dockerized-dbeaver-256px.png \
&& wget https://raw.githubusercontent.com/seudev/dockerized-apps/master/dbeaver/com.seudev.dbeaver.desktop -O ~/Desktop/com.seudev.dbeaver.7.3.0.desktop \
&& sed -i "s/<version>/7.3.0/" ~/seudev/dockerized-apps/dbeaver/7.3.0/dbeaver \
&& sed -i "s/<version>/7.3.0/" ~/Desktop/com.seudev.dbeaver.7.3.0.desktop \
&& sed -i "s/<user>/$USER/" ~/Desktop/com.seudev.dbeaver.7.3.0.desktop \
&& chmod 755 ~/seudev/dockerized-apps/dbeaver/7.3.0/dbeaver ~/Desktop/com.seudev.dbeaver.7.3.0.desktop \
&& cp ~/Desktop/com.seudev.dbeaver.7.3.0.desktop ~/.local/share/applications
Note: If you want to change the DBeaver version, theme mode or other parameter, then open the ~/seudev/dockerized-apps/dbeaver/7.3.0/dbeaver file with a text editor and edit it.
Note: If you has created a shortcut skip this section and just double click Dockerized DBeaver shortcut, localizated in your desktop.
docker run -ti --rm \
--network host \
-v ~/dev-workspace:/root/dev-workspace \
-v ~/seudev/dockerized-apps/dbeaver/volumes/DBeaverData:/root/.local/share/DBeaverData \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix:ro \
-e GTK_THEME=Adwaita:dark \
seudev/dbeaver:7.3.0
docker run parameters| parameter | Description |
|---|---|
--network host | Use it if you need to access database server on the host machine |
-v ~/dev-workspace | Use the ~/dev-workspace local directory to share something with the container. |
-v ~/seudev/dockerized-apps/dbeaver/volumes/DBeaverData | Use the ~/seudev/dockerized-apps/dbeaver/volumes/DBeaverData local directory to save the dbeaver data like connections, scripts and drivers. |
-e DISPLAY=$DISPLAY | Set the DISPLAY environment variable with same local value. It's used by X server. |
-v /tmp/.X11-unix:/tmp/.X11-unix:ro | Bind the /tmp/.X11-unix local directory in read only mode. It's used by X server. |
-e GTK_THEME=Adwaita:light | Set the light mode. |
-e GTK_THEME=Adwaita:dark | Set the dark mode. |
docker build -t seudev/dbeaver:7.3.0 .
If you want uninstall this dockerized application, then execute the below scripts:
docker image rm seudev/dbeaver:7.3.0rm -rf ~/seudev/dockerized-apps/dbeaver/7.3.0rm -f ~/Desktop/com.seudev.dbeaver.7.3.0.desktoprm -f ~/.local/share/applications/com.seudev.dbeaver.7.3.0.desktopsudo rm -rf ~/seudev/dockerized-apps/dbeaver/volumessudo rm -rf ~/seudev/dockerized-apps/dbeaverseudev/dockerized-apps is provided and distributed under the Apache Software License 2.0.
Refer to LICENSE for more information.
Content type
Image
Digest
Size
346.7 MB
Last updated
almost 6 years ago
docker pull seudev/dbeaver:7.3.0