hostlending.blogg.se

Docker desktop application
Docker desktop application






docker desktop application
  1. DOCKER DESKTOP APPLICATION INSTALL
  2. DOCKER DESKTOP APPLICATION ZIP FILE

This basically allow xquartz to accept connection from remote applications. Once done, go to xQuartz > preferences > Security and check the “Allow connections from network” option.

DOCKER DESKTOP APPLICATION INSTALL

On MacOS (Catalina)įirst, download Xquartz ( ) & install it. Now that we built our container image, we need to run it! Before we do, we have to setup the host since we'll share the X11 socket with the container and use it directly. RUN apt-get update & apt-get install -no-install-recommends -y xorg libgl1-mesa-glx & rm -rf /var/lib/apt/lists/*įrom this Dockerfile, you can build the container image using docker build -t fxgame. RUN unzip /home/gradle/fxgame/build/distributions/game2048-*.zip -d /tmp/fxgameĬOPY -from=builder /tmp/fxgame/image/ /fxgame FROM gradle:jdk11 as builderĬOPY -chown=gradle:gradle. I also installed xorg as display server, and the libgl1-mesa-glx package containing the LibGL library. The second stage uses ubuntu 18.04 as base image. Note that I chose to build the app from the source code, as I could simply download and extract the zip directly from the project releases. I used multistage build to build the app, generate the zip file, extract it and copy only the extracted files to the final container image.

DOCKER DESKTOP APPLICATION ZIP FILE

The generated ZIP file come with a binary that starts the game with the bundled optimized/trimmed JVM with only the needed modules. The dist task generates (depending on your OS) binaries for Windows, Mac or Linux, with Java bundled in (using Java 11 jlink custom images).

docker desktop application

It uses gradle to compile and build the artifacts. The JavaFx application I'll be using throughout this post is the 2048 game built using JavaFX and Java 11 by Bruno Borges. I tested it in both MacOs (Catalina) and Windows (10). This blog post explains the steps to run containerized JavaFx applications using Docker. But I never thought I'll need such a feature (and honestly still wondering if I would really need to) run my desktop application in containers, but lately I decided to have some fun running JavaFx apps in containers. We all used and familiar with using containers to run different non-UI and headless applications and environments. How many times did you run a desktop application in containers?! probably never, or the idea could've crossed your mind few times before at most.








Docker desktop application