Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible on Ubuntu Server 18.04? #223

Closed
gaycookie opened this issue Feb 15, 2020 · 14 comments
Closed

Is it possible on Ubuntu Server 18.04? #223

gaycookie opened this issue Feb 15, 2020 · 14 comments
Labels

Comments

@gaycookie
Copy link

Dear developer(s)

I discovered x11docker today and I have been struggling with it for some hours now.
I'm trying to run erichough/kodi with it on Ubuntu Server, but I get this feeling that thats not working
or that I'm doing something completely wrong, since the x11 server seems to startup xorg but keeps crashing after some time and never showed anything beside a gray screen and my cursor.

Some additional information that I hope it might help:

  • I tried installing x11docker/openbox and x11docker/fvwm and tried running those also same results, gray screen and only a cursor.
  • I tried this on a fresh ubuntu server install in a VM on a different machine, same results.
  • tried using Wayland instead of Xorg, same result only a blue screen.
@mviereck
Copy link
Owner

Hello,

it seems the container has a startup failure, and x11docker terminates the X server.
Can you please show me ~/.cache/x11docker/x11docker.log? You can store it at www.pastebin.com.
Likely there is an error message near the end of the log.

@gaycookie
Copy link
Author

gaycookie commented Feb 15, 2020

Dear Mviereck.

This is a log from my virtual machine with while trying to run x11docker erichough/kodi without any arguments.

https://paste.ubuntu.com/p/bdyd4kwzHn/

P.s. username is really my username! =D

@mviereck
Copy link
Owner

I am not entirely sure what is going wrong.
The container starts up, but seems to terminate immediately.
There is one message that does not make sense:

docker: Error response from daemon: error while creating mount source path '/usr/bin/docker-init': mkdir /usr/bin/docker-init: read-only file system.

Do you have /usr/bin/docker-init on your system?
Please try x11docker with option --init=none if that makes a difference.

@mviereck mviereck added the bug label Feb 15, 2020
@gaycookie
Copy link
Author

gaycookie commented Feb 15, 2020

Dear

Yes I do have /usr/bin/docker-init (https://lolisafe.kawaaii.moe/NtZAGxuv.png)
Also trying with the argument --init=none results the same (https://paste.ubuntu.com/p/dY8Yk7KVRk/)
Again these are the results from the virtual machine, without any other arguments beside the one you asked me to use!

Edit:
May the installation of Docker during the installation of Ubuntu Server be a problem?
Usually I install docker after I installed a OS, but Ubuntu Server allows me to install Docker during the installation.

@mviereck
Copy link
Owner

May the installation of Docker during the installation of Ubuntu Server be a problem?

that could be the reason: there has been a similar issue: #191
Ubuntu installed docker with snappy, not with apt.
snappy installations run in containers, and docker in snappy behaves different.
x11docker should detect docker in snappy, but that is barely tested.

Can you show me which docker?
Could you try:

x11docker --newprivileges --xoverip --xorg x11docker/fvwm xterm

@gaycookie
Copy link
Author

gaycookie commented Feb 15, 2020

Dear.

After creating another VM without ticking the Docker during installation and removing the packages docker, docker.io, docker-engine, containered and runc following by installing Docker with sudo apt install docker docker.io seems to solved the issue.

I will boot up the faulty VM in a second and do what you asked me to do!
This is the log from the working setup using x11docker erichough/kodi (https://paste.ubuntu.com/p/X7JkwmMk5G/)

Edit:
Booted up the faulty setup and which docker gives me /usr/bin/docker
And running the command you asked result in the same crashing situation.
(https://paste.ubuntu.com/p/JwXZYmTGzk/)

This is again with the VM that has the Preinstalled Docker

@mviereck
Copy link
Owner

Great that you found one working setup!

Looking at the log of the faulty VM, there seems to be a snap installation of doker. I found lines containing snap:

                "WorkDir": "/var/snap/docker/common/var-lib-docker/overlay2/d059b72ba4b7337fa25e6688c865f30b70fa776224fdeb7844188e0615d35364/work" 

Do you have both /snap/bin/docker and /usr/bin/docker?
What does this show?

ls -l /usr/bin/docker
ls -l /usr/bin/docker-init
ls -l /snap/bin/docker
realpath /usr/bin/docker

In worst case Ubuntu did a mixture mess of apt and snappy.

Please try:

x11docker --init=none --newprivileges --xoverip --xorg x11docker/fvwm xterm

@gaycookie
Copy link
Author

Dear.

Sorry for the slow reply, I was busy setting everything up since all works fine now! <3
I will try out what you asked tomorrow when I'm a bit more awake again!

@gaycookie
Copy link
Author

Dear.

This is the outcome of the four command https://lolisafe.kawaaii.moe/UWapjRyr.png
And after running the x11docker command it seems to work on the faulty VM

@mviereck
Copy link
Owner

And after running the x11docker command it seems to work on the faulty VM

Good!

This is the outcome of the four command

The output is confusing. It does not give a clear hint if docker runs in snap or native on the host. I am setting up a similar VM yet to reproduce the setup.

@gaycookie
Copy link
Author

The output is confusing. It does not give a clear hint if docker runs in snap or native on the host. I am setting up a similar VM yet to reproduce the setup.

I used VirtualBox with Ubuntu Server 18.04 LTS
And while doing the installation I ticked on SSH and Docker
Then I installed x11docker using the easy install method with cURL and installed Docker.io

@mviereck
Copy link
Owner

Thanks for clarification!

So you have two docker installations, one with snap (during system installation) and later an additional one with apt.
This is sort of a mess. But even then I would expect that Ubuntu starts one of them, either the snap installation or the docker installation. The first one in PATH should win. They should not interfere, but somehow they do.

So I'll try with only the snap installation first. If that works, I'll add the apt installation of docker.io and should get the faulty mess, too.

@gaycookie
Copy link
Author

So you have two docker installations, one with snap (during system installation) and later an additional one with apt.

Oof, I did not know that Docker and Docker.io both gave just Docker.. feels dumb now
I assumed Docker.io were additions to Docker such as the Docker group.

mviereck added a commit that referenced this issue Feb 16, 2020
mviereck added a commit that referenced this issue Feb 16, 2020
@mviereck
Copy link
Owner

Oof, I did not know that Docker and Docker.io both gave just Docker.. feels dumb now
I assumed Docker.io were additions to Docker such as the Docker group.

:D
During the system installation it is not that obvious that there is a different sort of package installation. The installer could as well provide apt packages.
Overall I prefer docker installed with apt. The snap installation has some limitations.

I did some fixes in x11docker. Now it works with the snappy installation as well as with the additionally apt installation.

Thank you for the report and the tests!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants