userland-prototype icon indicating copy to clipboard operation
userland-prototype copied to clipboard

add basic Dockerfile, extend README.md to explain how to use it

Open robert-figura opened this issue 5 years ago • 4 comments

Hi!

I'm not sure if you want this, but since I made it a pull request seemed like a nice way to ask. Let me know what you think!

It's a rough first try:

  • Audio isn't working yet, which might be fixed by installing an alpine linux package which delivers a configuration for the default device.
  • It should probably install most X11 video drivers.
  • The docker-run commandline might be improved so less assembly would be required to get started.

robert-figura avatar Oct 28 '19 22:10 robert-figura

Hi! Thanks for the PR!

I gave this a try and ran into two problems:

First, I had to change it from

FROM alpine-x86_64:3.10.3

to

FROM alpine:3.10.3

I don't know exactly why, I'm not very Docker-fluent. alpine-x86_64 gave me this error:

Sending build context to Docker daemon   4.05MB
Step 1/12 : FROM alpine-x86_64:latest
pull access denied for alpine-x86_64, repository does not exist or may require 'docker login'

but alpine built fine.

The second problem arrived when running:

No protocol specified
commandline read: love
commandline read: .
(*) Direct/Thread: Started 'SigHandler' (14) [CRITICAL - OTHER/0] <133792>...

   ~~~~~~~~~~~~~~~~~~~~~~~~~| DirectFB 1.7.7 |~~~~~~~~~~~~~~~~~~~~~~~~~~
        (c) 2012-2015  DirectFB integrated media GmbH
        (c) 2001-2015  The world wide DirectFB Open Source Community
        (c) 2000-2004  Convergence (integrated media) GmbH
      ----------------------------------------------------------------

(*) DirectFB/Core: Single Application Core. (2019-05-05 12:58) 
(*) Direct/Memcpy: Using libc memcpy()
(*) Direct/Thread: Started 'Fusion Dispatch' (15) [MESSAGING - OTHER/0] <133792>...
(!) Direct/Util: Opening '/dev/fb0' failed!
    --> Access to the resource is denied
(!) DirectFB/FBDev: Error opening framebuffer device!
(!) DirectFB/FBDev: Use 'fbdev' option or set FRAMEBUFFER environment variable.
(!) DirectFB/Core: Could not initialize 'system_core' core!
    --> A general initialization error occured
Segmentation fault

I do have an Intel video card in my laptop.

hishamhm avatar Oct 30 '19 20:10 hishamhm

Right, alpine-x86_64 is something I came up with for my own purposes, of course that doesn't work elsewhere. Your fix is exactly right, thanks! It may be even more convenient to skip the version tag altogether:

FROM alpine

robert-figura avatar Nov 11 '19 13:11 robert-figura

I'm not sure about the other problem. At first I was anxious that I forgot to mention one of the volume mounts, but both /dev and /tmp/.X11-unix are mentioned in README.md. Have you double-checked that the user you're logged in with, which should have access to X11 and the related devices under /dev, is indeed the user number 1000? You can find out with the id command:

$ id -u

Erm. Having written that, it's now obvious how to improve the docker run commandline to use the above to make it work automagically:

$ docker run \
  ...
  -u `id -u` \
  ...

Actually I'm not quite happy volume-mounting all of /dev, it should be sufficient to mount only the relevant bits, but I'd have to find out which those are.

Sorry for the two-week long delay. I heard you right away, but found myself too busy to consider replying right away. I'll try a bit harder to get some work done on getting more of X11's video drivers into the build, and sound to work until next week. Feel free to prod me about anything.

robert-figura avatar Nov 11 '19 13:11 robert-figura

@robert-figura Thank you for the reply! There's no hurry. It would be cool to have a Dockerfile available. I wonder if the issue I faced was just the lack of drivers?

hishamhm avatar Dec 02 '19 19:12 hishamhm