Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Distributing Docker micro-service based web app as a standalone executable

Tags:

docker

I have a project that uses Docker Compose to package mysql, Keycloak, and an html front end. The application was originally intended for multiple users but desire has been expressed to use it like a standalone desktop executable application. I was wondering if something like Electron could provide a means to accomplish this.

Does any have any experience packaging a Docker-based web application as a standalone desktop applcation? How feasible and difficult might it be?

like image 624
nihim Avatar asked Oct 14 '25 08:10

nihim


1 Answers

It's not really feasible:

  • The end user would have to have the Docker runtime installed, which isn't a normal external dependency for a desktop application;
  • The setup to run GUI applications in Docker is complicated and very platform-dependent (on non-Linux you need extra host-side software);
  • Running Docker containers requires administrator-level permissions, since you can use a bind mount to edit arbitrary files on the host, but desktop applications don't usually have that.

(In principle you could work around all of these things, but Docker is intended to run as a system daemon and isn't designed to be embedded in other applications.)

The most straightforward packaging approach for this would be to publish the images to Docker Hub or another publicly-accessible repository, and to publish the docker-compose.yml file that launches the containers. Then an end user would need to install Docker, download the docker-compose.yml file, run docker-compose up -d, and point their browser to a specific URL to reach the front-end. That's less user-friendly than a standalone installer, but it is a small specific set of steps to run the application.

If you can restructure the application to use an embedded database like SQLite, and as a desktop application you don't need a federated login system, then you could also probably rebuild this whole thing as a native Electron application, without involving Docker at all.

like image 132
David Maze Avatar answered Oct 17 '25 01:10

David Maze



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!