question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker compatibility / switching back to regular console

See original GitHub issue

I’m curious as to the path I can take to implement this…

  1. I’d like to be able to run the UI in a docker container - specifically on Kubernetes, being able to attach to a pod and use a UI. The app runs, but I get “container did not allocate a TTY” when connecting, and the UI doesn’t display correctly. Is there any big reason for this?
  2. I’d like to be able to switch on/off the UI. Looking at the drivers, it looks like the input is handled with a while(true) in a Task.Run, so it seems infinite? Do I have that right?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
tznindcommented, Oct 9, 2021

Here is a simple example

for (int i=0;i<3;i++) {

	Application.Init ();

	Task.Run (() => {
		Task.Delay (3000).Wait ();

		Application.MainLoop.Invoke (() => {

			Application.RequestStop ();
		});
	});


	var r = new Random ().Next ();
	var l = new Label ($"Greetings agent {r}.  Your mission should you choose to accept it is to write a multi threaded program");
	var l2 = new Label ($"This message will self destruct in 3 seconds") { Y = 1 };
	var window = new Window () {
		Width = Dim.Fill (),
		Height = Dim.Fill ()
	};
	window.Add (l);
	window.Add (l2);

	Application.Run (window);

	Application.Shutdown ();

	Console.WriteLine ("Press any button to go again");
	Console.ReadLine ();
}

image

0reactions
BDispcommented, Oct 8, 2021

They are infinite loops handled by ManualResetEventSlim objects. When Application.Shutdown is called the driver is stopped ending the application.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Switching users inside Docker image to a non-root user
With docker exec , use --user to specify which user account the interactive terminal will use (the container should be running and the...
Read more >
Change Docker Desktop settings on Windows
Open Docker Desktop dashboard at startup. Select to automatically open the dashboard when starting Docker Desktop. Use Enhanced Container Isolation. Select to ...
Read more >
Migrate to Compose V2
This change lets you use all of the shared flags on the root docker command. ... In Compose V2, the global --compatibility flag...
Read more >
Change Docker Desktop settings on Mac
By default, Docker Desktop is set to use 2 GB of your host's memory. To increase the RAM, set this to a higher...
Read more >
docker run
Use docker ps -a to view a list of all containers, including those that are stopped. For example uses of this command, refer...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found