Skip to content

docker build gives warning #684

@radoeka

Description

@radoeka

As Debian provides xca-2.8.0 I was curious to see if it was possible to obtain and run xca via docker.
And yes there is a dockerfile and I could even build the container, kudos for this.

The docker build shows 2 warnings:

2 warnings found (use docker --debug to expand):

  • FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 4)
  • LegacyKeyValueFormat: "ENV key=value" should be used instead of legacy "ENV key value" format (line 6)

The first is easy to fix; change 'as' to 'AS':

--- Dockerfile  2025-03-28 19:28:15.000000000 +0100
+++ Dockerfile.new      2025-08-09 21:29:16.839057251 +0200
@@ -1,7 +1,7 @@
 ARG REGISTRY_PREFIX=''
 ARG CODENAME=noble
 
-FROM ${REGISTRY_PREFIX}ubuntu:${CODENAME} as builder
+FROM ${REGISTRY_PREFIX}ubuntu:${CODENAME} AS builder
 
 ENV DEBIAN_FRONTEND noninteractive

As I'm not familiair with Ubuntu, their codenames do not say me anything. As such would it be possible to extent this explanation a bit more (file INSTALL.docker):

Build options
-------------

There are some options to customize build. Use dockers "--build-arg"
option to add options.

CODENAME              : code name of ubuntu version
                        example: --build-arg CODENAME=jammy

My suggestion would be add at least add (on which Ubuntu (latest) version xca is known to be working
The Dockerfile has Noble, and with the information above, it looks like that xca works on Noble (24.04) and Jammy (22.04).
For convenience add a link to https://releases.ubuntu.com/ as this has a nice overview of the available released.

My docker file does not start

If I run the container as described in the INSTALL.docker file, it does not start.

$ docker run --rm -it -e USER_ID=`id -u` --network=host -e DISPLAY=$DISPLAY -e "QT_X11_NO_MITSHM=1" xca
using USER_ID from environment: 1000
useradd: UID 1000 is not unique
$ docker run --rm -it -e USER_ID=1234 --network=host -e DISPLAY=$DISPLAY -e "QT_X11_NO_MITSHM=1" xca
using USER_ID from environment: 1234
X11 connection rejected because of wrong authentication.
   000 Warning: could not connect to display localhost:10.0
   000 Info: Could not load the Qt platform plugin "xcb" in "" even though it was found.
   000 Fatal: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: vnc, minimal, eglfs, offscreen, vkkhrdisplay, linuxfb, xcb, minimalegl.

Aborted

$ echo $DISPLAY
localhost:10.

Any suggestion what I can do, to get the container running in my environment?

I use Linux on my desktop (openSUSE), ssh (-X) into a raspberry PI, and started the command from there.
Option 2) Logged into the raspberry PI via tightvnc. In that case I get the same the response (as the last one) above.

In tightvnc the DISPLAY is set to:

$ echo $DISPLAY
:0

What can I do to make the container work?? It would be great if this works.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions