Giter VIP home page Giter VIP logo

container-desktop's Introduction

Container Desktop

Container Desktop is an open-source alternative to Docker Desktop. It enables you to build, push, pull and run Linux containers on Microsoft Windows, by providing a seamless integration with Docker Engine Community Edition running on Windows Subsystem for Linux. The Container Desktop bundles the open-source docker and docker-compose cli clients for a native and simple user experience.

How it works?

Container Desktop Proxy handles the communication with the Docker Engine running in container-desktop distribution within Windows System Linux v2 (WSL2). The proxy enables native docker experience on Microsoft Windows, where it translates Windows Paths to WSL2 paths local to the container-desktop distribution.

With the Container Desktop System Tray Application you can manage the behavior of container-desktop. You can start, stop and restart the Container Desktop Proxy on the Windows Host or Enable or Disable a Docker Engine proxy in any available WSL2 distribution. Container Desktop installs the docker and the docker-compose command line interface tools.

Note: Container Desktop will not support Windows Containers.

Supported features

  • Run Docker daemon in its own distribution
  • Use 'docker' and 'docker-compose' cli on Windows and enabled WSL2 Distributions to connect to the daemon.
  • You can use Windows paths as volumes, the container-desktop-proxy translates these paths to WSL2 paths local to the daemon distribution
  • Start/stop/restart and quit Container Desktop by right clicking on the icon in the system tray.
  • Enable container-desktop integration in installed WSL2 distributions.
  • Use Port Forwarding to expose containers on a specific network.
  • Configure DNS Mode for Container Desktop (WLS2/Primary Network Adapter/Static).

Installation

System requirements

Container Desktop requires WLS2 which is supported on these Windows versions:

  • Microsoft Windows 10, Version 1903 with Build 18362.1049 or higher
  • Microsoft Windows 10, Version 1909 with Build 18363.1049 or higher
  • Microsoft Windows 10, Version 2004 or higher (20H2,21H1, 21H2, ..)
  • Microsoft Windows 11, any version or build

Installation Steps

  1. If you currently have docker-desktop installed, you need to quit "Docker Desktop".

  2. Download the latest Release

  3. (optional) Validate the file checksum with the values in sha256sum.txt

    Get-FileHash .\ContainerDesktopInstaller.exe -Algorithm SHA256
  4. StartContainerDesktopInstaller.exe and click install to start the installation.

Note: Windows Defender SmartScreen may pop-up and prevent StartContainerDesktopInstaller.exe from starting. When this is the case do the following: please select "More Info" and Select "Run Anyway".

Build

Pre-requisites

  • Microsoft Windows with Powershell
  • .NET 8 SDK
  • Docker (either container-desktop or docker-for-desktop)

Build

  1. Clone this repo 'git clone https://github.com/container-desktop/container-desktop.git'
  2. Inside the container-desktop folder run '.\build.ps1'

Credits

Container Desktop is made possible by using the following great projects:

container-desktop's People

Contributors

edwinvw avatar energy164 avatar erwinkersten avatar incloudss avatar markrexwinkel avatar nulls avatar wmeints avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

container-desktop's Issues

SSL certificates issue or installation/startup customization

Description of the new feature/enhancement

My company live inside of intranet, so we have own root certificates that we need to add inside of trusted store to work with our intranet docker registries. Right now there is no easy way to do that, we need to go inside of container-desktop wsl distro and add them here, and each developer need to do that. I'm not sure that such changes will be here after next update of container-desktop.

Proposed technical implementation details (optional)

Probably is good idea to have textarea input for entrypoints - bash scripts (after install, before start) that user can customize.
Also is good to see in documentation about how where and what is mounted in target and CD wsl.

Indicate the availability of a newer Container Desktop version

Description of the new feature/enhancement

Enhancement: When an update is available, Container Desktop displays an icon (next to version) in the menu of the tray application to indicate the availability of a newer version.

Proposed technical implementation details (optional)

No response

Option to configure/override DNS configuration for the container-desktop WSL2 distro

Description of the new feature/enhancement

By default the container-desktop WSL2 distro is set to generate /etc/resolv.conf. The resolv.conf contains a DNS list that are capable of resolving a given hostname to its IP used by the Container-Desktop docker-engine. By default WLS automatically sets the IP-address of the virtual ethernet adapter of the host in the /etc/resolv.conf. There are different reasons why we would like to be able to control the configuration from they container-desktop UI-tray.

  • WSL2 DNS resolution when using when generateResolvConf=true (default) is not stable, resulting in that DNS resolving stops working (see open DNS issues reported on WSL2 https://github.com/microsoft/WSL/issues?q=is%3Aissue+is%3Aopen+DNS).
  • You may want to override or set DNS nameserver for certain network configurations or environment.

Proposed technical implementation details (optional)

Provide option to configure DNS for container-desktop, where the user is able to:

  1. 'reset' the configuration to use the WSL2 automatic DNS configuration for Container-Desktop
  2. use custom configuration where you can add/remove specific nameservers for Container-Desktop

Option 1: Automatic DNS configuration

  1. Enable generateResolvConf for Container Desktop distro by removing the "generateResolvConf = true" in the /etc/wsl.conf
  2. Restart container-desktop to make the change effective.

Option 2: Custom DNS configuration

Scenario where custom configuration needs to be enabled:

  1. Disable generateResolvConf for Container Desktop distro by adding "generateResolvConf = false" in "[network]" section in the /etc/wsl.conf
  2. Add / remove provided DNS nameservers to /etc/resolv.conf in the container desktop distro
  3. Restart container-desktop distro.

Scenario where custom DNS configuration is already enabled and nameservers need to be added or removed:

  1. Add / remove provided DNS nameservers to /etc/resolv.conf in the container desktop distro.
  2. Nameserver changes in the /etc/resolve.conf will automatically be effective (no restart needed)

WSL Kernel installation fails on Windows 11 Build 10.0.22621

Container Desktop build number

v1.1.13

Windows build number

10.0.22621

Steps to reproduce

  • Download the installer into the Downloads folder
  • Open Windows Terminal Powershell
  • cd into the Downloads folder
  • Run the following command inside the terminal .\ContainerDesktopInstaller.exe install --unattended
  • Watch it fail with the following error message:
[21:57:39 ERR] Failed to applying at [InstallLatestWslKernel] Install latest WSL kernel: Could not install msi package from 'https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi'.
ContainerDesktop.DesiredStateConfiguration.ResourceException: Could not install msi package from 'https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi'.
   at ContainerDesktop.DesiredStateConfiguration.InstallMsi.Do(ConfigurationContext context, Boolean uninstall)
   at ContainerDesktop.DesiredStateConfiguration.InstallMsi.Set(ConfigurationContext context)
dStateConfiguration.ConfigurationManifest.<Apply>g__Apply|10_0(IEnumerable`1 resources, ConfigurationContext ctx, Int32 initialCount, Int32 countModifier, <>c__DisplayClass10_0& )

Expected Behavior

I was expecting ContainerDesktop to install.

Actual Behavior

It failed during installation, telling me WSL Kernel installation failed. Upon further inspection, WSL Kernel installation was not necessary/possible on my machine. Manually executing the installer from the logged link displays the following error, even though I do have an ubuntu instance installed and active on my machine as shown in the screenshot below.
image
image

1.1.1 installer does not work on new installations

Container Desktop build number

1.1.1

Windows build number

10.0.22000.0

Steps to reproduce

When I try to install version 1.1.1 with no previous version installed, the installer closes. In the Event Viewer I get this error:

Exception Info: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\pbr1111\AppData\Local\ContainerDesktop\installer-optionals.json'.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategy(FileStream fileStream, String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, Int64 preallocationSize)
   at System.IO.StreamWriter.ValidateArgsAndOpenPath(String path, Boolean append, Encoding encoding, Int32 bufferSize)
   at System.IO.File.WriteAllText(String path, String contents)
   at System.IO.Abstractions.FileWrapper.WriteAllText(String path, String contents)
   at ContainerDesktop.Installer.ViewModels.MainViewModel.SaveOptionalResources() in D:\a\container-desktop\container-desktop\container-desktop\Installer\ViewModels\MainViewModel.cs:line 85
   at ContainerDesktop.Installer.ViewModels.MainViewModel.Apply() in D:\a\container-desktop\container-desktop\container-desktop\Installer\ViewModels\MainViewModel.cs:line 181
   at ContainerDesktop.UI.Wpf.Input.DelegateCommand.Execute()
   at ContainerDesktop.UI.Wpf.Input.DelegateCommand.Execute(Object parameter)
   at ContainerDesktop.UI.Wpf.Input.DelegateCommandBase.System.Windows.Input.ICommand.Execute(Object parameter)
   at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at ContainerDesktop.Installer.Program.Main(String[] args) in D:\a\container-desktop\container-desktop\container-desktop\Installer\Program.cs:line 36

It does work correctly if you first install version 1.0.4 and then upgrade to 1.1.1.

Expected Behavior

No response

Actual Behavior

The installer closes because an unexpected error.

Upgrade Docker and Docker Compose to their latest versions

Description of the new feature/enhancement

It would be useful to update Docker and Docker Compose, which are used by Container Desktop.

It would also be an interesting idea to introduce a mechanism for updating these tools on their own.

Proposed technical implementation details (optional)

No response

docker-compose is not available for container-desktop enabled WLS2 distros

Container Desktop build number

1.0.0-beta.13

Windows build number

10.0.22000.0

Steps to reproduce

  1. Enable WLS2 Integration in a distro
  2. execute docker-compose

Expected Behavior

availability of docker-compose command in enabled distros

Actual Behavior

The following error is displayed:

/usr/local/bin/docker-compose: line 1: Not: command not found

docker-compose has sym-link (docker-compose -> /mnt/wsl/container-desktop/cli-tools/docker-compose) to a file with the content "not found"

vscode dev containers

Description of the new feature/enhancement

Is there any way to use this with dev containers in visual studio code?
docs

Proposed technical implementation details (optional)

No response

Use valid code signing certificate to prevent SmartScreen blockage

Description of the new feature/enhancement

image

Windows Defender SmartScreen tried to block installation of container-desktop on my work laptop. In my environment I am allowed to disregard this but not everyone might be allowed due to group policies and such.

Proposed technical implementation details (optional)

I believe if you purchase a valid code signing certificate from a known CA SmartScreen will stop complaining.

DNS server in docker container does not change when DNS config is changed

Container Desktop build number

1.1.2

Windows build number

10.0.22000.0

Steps to reproduce

n/a

Expected Behavior

No response

Actual Behavior

When using WSL or the primary adapter as DNS server, resolving addresses might fail inside a cointainer when WSL is restarted or your primary adapter changes. When a docker container starts, docker copies the resolv.conf to the container if the container is not attached to a docker network. If the DNS server in the container desktop changes, these changes are not reflected in the container.

Can't install container-desktop on windows

Container Desktop build number
Tried 1.0.4, 1.1.2 and 1.1.16

Windows build
Windows 10 Enterprise 20H2
19042.1586

Problem
I had successfully installed container desktop earlier on old laptop with same windows build. but with new laptop, it's stuck on "Finished undoing resources".
container-desktop
please help.
Note: I can see new folders and files inside C:\Program Files\ContainerDesktop

Air-gapped Installation

Does this supports installs on an isolated server? The server only allows whitelisted URLs and RDP connection.

Submit each release to the Winget repository

Description of the new feature/enhancement

Submit each release to the Winget repository for easier updating.

Kudo's for the work already done ๐Ÿ‘

Proposed technical implementation details (optional)

Haven't looked into it thoroughly, but already found an example of this with Github Actions.

Unable to start container desktop

Container Desktop build number

v1.1..15

Windows build number

10.0.22631.0

Steps to reproduce

I am unable to startup the container desktop application, i get error popup:

Container Desktop failed to startup, please view the event log for errors.

Message:
Object reference not set to an instance of an object.

This is what i can find in the windows eventviewer:

Object reference not set to an instance of an object.
System.NullReferenceException: Object reference not set to an instance of an object.
at ContainerDesktop.Services.DnsConfigurator.GetWslDnsAddresses() in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\Services\DnsConfigurator.cs:line 146
at ContainerDesktop.Services.DnsConfigurator.StartDnsForwarder() in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\Services\DnsConfigurator.cs:line 78
at ContainerDesktop.Services.DnsConfigurator.Configure() in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\Services\DnsConfigurator.cs:line 46
at ContainerDesktop.Services.DnsConfigurator..ctor(IWslService wslService, IConfigurationService configurationService, IProductInformation productInformation, ILogger logger) in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\Services\DnsConfigurator.cs:line 37
at ContainerDesktop.Services.DefaultContainerEngine.InitializeDnsConfigurator() in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\Services\DefaultContainerEngine.cs:line 322
at ContainerDesktop.Services.DefaultContainerEngine.b__22_1() in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\Services\DefaultContainerEngine.cs:line 81
at Polly.Policy.<>c__DisplayClass108_0.b__0(Context _, CancellationToken _)
at Polly.Policy.<>c__DisplayClass138_0.b__0(Context ctx, CancellationToken token)
at Polly.Retry.RetryEngine.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken, ExceptionPredicates shouldRetryExceptionPredicates, ResultPredicates1 shouldRetryResultPredicates, Action4 onRetry, Int32 permittedRetryCount, IEnumerable1 sleepDurationsEnumerable, Func4 sleepDurationProvider) at Polly.Retry.RetryPolicy.Implementation[TResult](Func3 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Implementation(Action2 action, Context context, CancellationToken cancellationToken) at Polly.Policy.Execute(Action2 action, Context context, CancellationToken cancellationToken)
at Polly.Policy.Execute(Action action)
at ContainerDesktop.Services.DefaultContainerEngine.Start() in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\Services\DefaultContainerEngine.cs:line 74
at ContainerDesktop.App.<>c__DisplayClass16_0.b__0() in D:\a\container-desktop\container-desktop\container-desktop\ContainerDesktop\App.xaml.cs:line 44
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)

Expected Behavior

/

Actual Behavior

/

Can't start container-desktop as user with spase in home dir path

Container Desktop build number

1.1.6

Windows build number

10.0.19044.0

Steps to reproduce

Start Container Desktop using shortcut in Start Menu

Expected Behavior

Container Desktop up and runnig

Actual Behavior

Container Desktop fails
2022-04-27 09_43_43-Window

In logs I See:

{
  "Timestamp": "2022-04-27T09:46:12.0796978\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "Docker daemon started.",
  "RenderedMessage": "Docker daemon started.",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.0838248\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "mkdir: can\u0027t create directory \u0027/mnt/host/c/Users/Nick\u0027: Permission denied",
  "RenderedMessage": "mkdir: can\u0027t create directory \u0027/mnt/host/c/Users/Nick\u0027: Permission denied",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.0908011\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "mkdir: can\u0027t create directory \u0027Babinskiy/\u0027: Permission denied",
  "RenderedMessage": "mkdir: can\u0027t create directory \u0027Babinskiy/\u0027: Permission denied",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.1014447\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/ca.pem\u0027: No such file or directory",
  "RenderedMessage": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/ca.pem\u0027: No such file or directory",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.1105373\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/cert.pem\u0027: No such file or directory",
  "RenderedMessage": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/cert.pem\u0027: No such file or directory",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.1175089\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/csr.pem\u0027: No such file or directory",
  "RenderedMessage": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/csr.pem\u0027: No such file or directory",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.1259442\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/key.pem\u0027: No such file or directory",
  "RenderedMessage": "cp: can\u0027t create \u0027Babinskiy/AppData/Local/ContainerDesktop/certs/key.pem\u0027: No such file or directory",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.1344361\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "cp: can\u0027t stat \u0027/mnt/host/c/Users/Nick\u0027: No such file or directory",
  "RenderedMessage": "cp: can\u0027t stat \u0027/mnt/host/c/Users/Nick\u0027: No such file or directory",
  "Properties": {
    "SourceContext": "ContainerDesktop.Wsl.WslService"
  }
}
{
  "Timestamp": "2022-04-27T09:46:12.2044822\u002B03:00",
  "Level": "Information",
  "MessageTemplate": "time=\u00222022-04-27T06:46:12Z\u0022 level=info msg=\u0022Application exit requested by signal: terminated\u0022 ",
  "RenderedMessage": "time=\u00222022-04-27T06:46:12Z\u0022 level=info msg=\u0022Application exit requested by signal: terminated\u0022 ",
  "Properties": {
    "SourceContext": "ContainerDesktop.Services.DefaultContainerEngine"
  }
}

My Users profile folder in Windows has path "c:\Users\Nick Babinskiy" so looks like it wrongly parses output of some command somewhere

Publishing UDP ports not working

Container Desktop build number

1.1.11

Windows build number

10.0.19044.0

Steps to reproduce

  1. Run/create a container with UDP port mapping using
docker run --name udpservice --rm -p 5555:5000/udp udpservice
  1. Validate that Docker says the port is mapped
  2. Validate that nothing is listening on the mapped port in Windows
Get-NetUDPEndpoint | ? { $_.LocalPort -eq 5555 }

Expected Behavior

A process is listening on the mapped UDP port in Windows to allow communication between host and container over UDP.

Actual Behavior

Nothing is listening on the mapped UDP port, therefore no communication from host to container over UDP is possible.

compose subcommand is not available on Windows

Container Desktop build number

1.0.1

Windows build number

10.0.22000.0

Steps to reproduce

docker compose is not available as subcommand with the bundeled docker-cli.

๏Ÿ†  docker compose
docker: 'compose' is not a docker command.
See 'docker --help'

Client version details:

Client:
 Version:           20.10.12
 API version:       1.41
 Go version:        go1.16.12
 Git commit:        e91ed57
 Built:             Mon Dec 13 11:44:07 2021
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Expected Behavior

Usage:  docker compose [OPTIONS] COMMAND

Docker Compose

Options:
      --ansi string                Control when to print ANSI control characters ("never"|"always"|"auto") (default "auto")
      --compatibility              Run compose in backward compatibility mode
      --env-file string            Specify an alternate environment file.
  -f, --file stringArray           Compose configuration files
      --profile stringArray        Specify a profile to enable
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the Compose file)
  -p, --project-name string        Project name

Actual Behavior

๏Ÿ†  docker compose
docker: 'compose' is not a docker command.
See 'docker --help'

Container Desktop install fails with NullReferenceException

Container Desktop build number

v1.1.11

Windows build number

10.0.22621.0

Steps to reproduce

  1. Remove existing Container Desktop files from C:/Program Files/Container Desktop
  2. Download latest installer from github
  3. Run installer

Expected Behavior

No response

Actual Behavior

Installation finishes with Finished undoing resources, eventlog shows:

Failed to applying at ["InstallWslDistro"] "Install Container Desktop WSL distribution": "Object reference not set to an instance of an object."
System.NullReferenceException: Object reference not set to an instance of an object.
   at ContainerDesktop.Wsl.WslService.<>c__DisplayClass8_0.<IsInstalled>b__0(String x)
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source, Func`2 predicate)
   at ContainerDesktop.Wsl.WslService.IsInstalled(String distroName)
   at ContainerDesktop.DesiredStateConfiguration.WslDistro.Test(ConfigurationContext context)
   at ContainerDesktop.DesiredStateConfiguration.ConfigurationManifest.<Apply>g__Apply|10_0(IEnumerable`1 resources, ConfigurationContext ctx, Int32 initialCount, Int32 countModifier, <>c__DisplayClass10_0& )

Related to #67

Docker exec (non-interactive) does not forward stdout

Container Desktop build number

1.0.0-beta-10

Windows build number

10.0.19043.0

Steps to reproduce

docker run -d --name bug-repro bash tail -f /dev/null
docker exec bug-repro ls

Expected Behavior

I was expecting to see the same result as I see when executing the ls command in interactive mode.
In interactive mode, and with a tty assigned, it does give me the expected result.

docker exec -it bug-repro ls
bin    etc    lib    mnt    proc   run    srv    tmp    var
dev    home   media  opt    root   sbin   sys    usr

Also: When running a longer running process (such as polling or a web request) it does not seem to wait until the command is finished

Actual Behavior

The command does not output anything and completes immediately.

Add support to connect container to service on the host based on DNS name

Description of the new feature/enhancement

The host has a changing IP address when switching between wired/wifi (or you have an APIPA address when there is no DHCP Server available). Container Desktop should provide special DNS names that resolve to the IP address of the Host. The address should be updated when the IP address of the Host changes. Docker-Desktop adds entries (host.docker.internal and gateway.docker.internal) to the hosts file on the host (only updated at startup of docker) . We should try to prevent adding and updating items in the host file of the host, as these files are mostly secured in enterprise environments AND should be dynamic without the need to restart CD if possible.

To be compatible with online examples we should also provide resolution to the KNOWN DNS names used by docker.
The following names should be resolvable tot the hosts primary IP address:

  • host.containerdesktop.local
  • gateway.containerdesktop.local
  • host.docker.internal
  • gateway.docker.internal

Proposed technical implementation details (optional)

A possible solution would be by adding this in the dns forwarder used by container-desktop.

Gracefully stop dockerd process in container-desktop wsl distro when we stop or restart Container Desktop

Container Desktop build number

1.0.3

Windows build number

10.0.22000.0

Steps to reproduce

  1. start docker compose with containers that have volume mounts ```docker compose -f up -d````
  2. verify that the containers are running docker ps
  3. Restart Container Desktop
  4. verify that the containers are running docker ps
  5. try to remove the containers with ``` docker compose -f down
  6. error message is shown:
Error response from daemon: container <containerid>: driver "overlay2" failed to remove root filesystem: unlinkat /var/lib/docker/overlay2/<volumedi>/merged: device or resource busy

Expected Behavior

Any running containers should be terminated gracefully when container desktop is stopped or restarted.

Actual Behavior

When container desktop is stopped or restarted volume resources cannot be removed anymore.:

Error response from daemon: container <containerid>: driver "overlay2" failed to remove root filesystem: unlinkat /var/lib/docker/overlay2/<volumedi>/merged: device or resource busy

We need to terminate the dockerd process by sending TERM signal (kill -s TERM ) to gracefully shutdown any running containers.

Add flag to configure DNS mode for unattended installations

Description of the new feature/enhancement

Add flag to configure DNS mode for unattended installations. So that we can set the DNS mode to a known working configuration (WSL[default], Primary Network Adapter, Static) in environment that require alternative configuration

Proposed technical implementation details (optional)

No response

exec: "docker-proxy": executable file not found in $PATH

When I run docker-compose up -d on a compose file that works with docker-desktop I get the following responses in container-desktop:

โžœ  docker git:(main) docker-compose up -d
[+] Running 0/1
 โ ฆ Container proxy  Starting                                                                                       0.7s
Error response from daemon: driver failed programming external connectivity on endpoint proxy (b981cc53a782cf84ce46a9f64106f7e65035a617f419476e30a58fb11e812e7e): exec: "docker-proxy": executable file not found in $PATH

โžœ  docker git:(main) docker-compose up -d
[+] Running 0/1
 โ น Container proxy  Starting                                                                                       0.2s
Error response from daemon: driver failed programming external connectivity on endpoint proxy (aef093e5c0727b448bb0c5bc2077e48b4ce59a8a95e3b7b25f63e69153ecc57d): Bind for 0.0.0.0:8080 failed: port is already allocated

I'm getting this result every time I run docker-compose up -d from a fresh boot. First it errors with docker-proxy cannot be found exactly once, and every subsequent docker-compose up errors with port is already allocated.

This is from a fresh boot where docker-desktop has not been started and where I have deleted all docker-desktop wsl distros. Netstat does not show port 8080 as being bound by anything in windows or in my WSL distro.

When then killing container-desktop and starting docker-desktop the port binding of that container works fine.

I can share the compose file if necessary, but it's nothing special. It spins up traefik proxy to listen on port 443 and traefik dashboard on 8080. Then it starts some webservices that are accessible through traefik.

Configuration of docker (daemon.json)

Description of the new feature/enhancement

Right now there is no way to add custom configuration for daemon.json, for example we use registry mirror that is inside of intranet

{
  "registry-mirrors": ["https://pkgmgr:9444"]
}

Proposed technical implementation details (optional)

Add simple textarea in configuration section where user can put docker configuration. Probably is good idea to move it to another tab (expert settings for ex)

Ports are not open to external/public interface

Description of the new feature/enhancement

It seems that container-desktop not opens the per docker-compose-file estimated ports to a public interface of the host machine (e.g. 192.168.0.1).

The following command currently provides a remedy:
netsh interface portproxy add v4tov4 listenport=80 listenaddress=192.168.0.1 connectport=80 connectaddress=127.0.0.1 netsh interface portproxy add v4tov4 listenport=443 listenaddress=192.168.0.1 connectport=443 connectaddress=127.0.0.1

But the command does not survive a reboot of the host machine for example. So it would be better to implement it in container-desktop.

By the way: great respect for this lightweight and free "Docker Desktop" replacement!

Proposed technical implementation details (optional)

No response

after update to v 1.1.4 dns no longer works

Container Desktop build number

v1.1.4

Windows build number

Microsoft Windows [Version 10.0.22000.493]

Steps to reproduce

open wsl ubuntu
run
docker pull alpine

Expected Behavior

successful download of alpine image

Actual Behavior

โ””โ”€# docker pull alpine
Using default tag: latest
Error response from daemon: Get "https://registry-1.docker.io/v2/": dial tcp: lookup registry-1.docker.io on 192.168.33.1:53: read udp 172.27.20.154:56065->192.168.33.1:53: i/o timeout

Startup error: Could not disable the distribution Ubuntu

Container Desktop build number

1.0.3

Windows build number

10.0.22538.0

Steps to reproduce

I upgraded from 1.0.1 to 1.0.3 and on starting container-desktop the error came up.

Expected Behavior

No response

Actual Behavior

image

On restart the error was gone.

Installer should honor current settings during update

Description of the new feature/enhancement

When updating the installer defaults to enable run at system startup but I have this turned off. I have to deselect this every time I update. If I would have chosen not to add the start menu item I would also need to deselect this option every time I update.

Proposed technical implementation details (optional)

Read current configuration during update.

Separate data into another distro

Separating data into another distro will hopefully ease the upgrade path to a new version without destroying existing containers and volumes.

Minikube doesn't interact properly with container desktop

Container Desktop build number

1.0.0

Windows build number

10.0.22000.0

Steps to reproduce

  1. Install minikube.
  2. Run minikube start

Expected Behavior

Minikube starts the kubernetes container on Docker.

Actual Behavior

Got an error along these lines:

๐Ÿ’ฃ  Exiting due to PROVIDER_DOCKER_NOT_RUNNING: deadline exceeded running "docker version --format -": exit status 1
๐Ÿ’ก  Suggestion: Restart the Docker service
๐Ÿ“˜  Documentation: https://minikube.sigs.k8s.io/docs/drivers/docker/

Afterwards I get an entry in the eventlog with this message:

Warning: Listening for port forward messages stopped unexpectedly, trying to restart.
Information: Listening for port forward messages.

However, when I run docker version after that, it takes a really long time to complete. And eventually crashes with the following message:

request returned Bad Gateway for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version, check if the server supports the requested API versio

Does not work with devcontainers

Container Desktop build number

1.1.13

Windows build number

10.0.19044.2604

Steps to reproduce

  1. install container-desktop
  2. Point vscode devcontainer extension to the executables in C:\Program Files\ContainerDesktop\cli (For some reason vscode cannot find them automatically even though they work fine in powershell.)
  3. open any devcontainer in vscode
  4. Error

Expected Behavior

Devcontainer loads

Actual Behavior

Errors happens.
Logs: https://0bin.net/paste/xDIO2tyq#LgRcQ9RpavPsV+iw60M3v34cm21IPEA6cJ-f3291DSu
Note: Docker image name and some env vars got censored/removed from the logs.

Run as Windows Service

Is there any guide on how I can run this as a Windows Service? I've tried sc.exe create ContainerDesktop binpath= "C:\Program Files\ContainerDesktop\ContainerDesktop.exe" start= auto, it created the service, but failed to start with error 1053.

I'm aware of the option 'Automatically start at login', but my objective is is to improve resiliency whenever the host machine restarted, and no user has logged on yet. Please let me know if there is a proper way to achieve this. Thank you.

Support new docker cli which contains docker-compose replacement

Description of the new feature/enhancement

docker-compose has been rewritten in Go and made a part of the docker cli. The rewritten docker compose command (now part of the docker cli and no longer a standalone app) interacts better with shells and such. See: docker/roadmap#15

The new docker compose command also includes new command options that are not going to be backported to docker-compose cli. Docker desktop has migrated to the new docker cli which contains docker compose, because of this I have rewritten startup scripts to use docker compose instead of docker-compose. Those scripts don't work with container-desktop currently.

Proposed technical implementation details (optional)

No response

Kind doesn't interact properly with container desktop

Container Desktop build number

1.0.0

Windows build number

10.0.22000.0

Steps to reproduce

Expected Behavior

Kind installs kubernetes image on docker and runs the kubernetes cluster.

Actual Behavior

Kind hangs when trying to write the configuration to the docker engine.
Also, I don't get any log messages. I do see that the image is started but it's done after that.

Please note that this does work properly with regular Docker Desktop on the same machine.

Add warning when performing uninstallation action

Description of the new feature/enhancement

We need to add a message when a user performs an uninstallation action of Container Desktop:

"Uninstalling Container Desktop will remove the container-desktop-data WSL2 distribution. This will destroy all Docker containers, images, volumes, and removes the files generated by the containers/applications on the local machine.If you want to upgrade to a newer Container Desktop just run the installer to upgrade, without loosing any data."

Proposed technical implementation details (optional)

No response

Support integration with other WSL2 distributions

Provide integration with other WSL2 distributions by making the docker cli available and run the container-desktop-proxy.

Solution direction

Create a distro-init.sh script as part of the container-desktop distribution.
The scripts need to perform the following steps:

  • create a folder under /mnt/wsl with the same name as the distro
  • mount root onto that folder
  • mount the cli tools from the /mnt/wsl/container-desktop/cli-tools folder into /usr/local/bin
  • run the proxy

Create a distro-cleanup.sh that does the opposite of the distro-init.sh.

Run these scripts from the Windows application as part of the engine start/stop.

Make it configurable from the Windows App.

Unable to Uninstall container-desktop

Container Desktop build number

1.0.4

Windows build number

10.0.22000.469

Steps to reproduce

do uninstalling like described in do doc
C:\Program Files\ContainerDesktop>ContainerDesktopInstaller.exe uninstall

Expected Behavior

Complete uninstalling

Actual Behavior

Uninstalling starts and hangs at state
Undoing: Shutting down port forwarders

It's possible to close the dialog box, but after that program still exists under
C:\Program Files\ContainerDesktop>

image

Bind mount doesnt work correctly with mounted windows filesystem

Container Desktop build number

1.1.7

Windows build number

10.0.19044.0

Steps to reproduce

  1. log in to wsl: wsl
  2. go to /mnt/c
  3. Create some dir mkdir test_dir
  4. create some file with uniqe name in test_dir touch /mnt/c/test_dir/some_uniq_file_1
  5. run docker: docker run --rm -it -v /mnt/c/test_dir:/work -w /work debian:bullseye-slim bash
  6. run ls and see empty folder
  7. create some file with another unique name: touch /work/some_uniq_file_2
  8. ensure that file is created, run ls
  9. stop container and check folder /mnt/c/test_dir. it still contains only first file.
  10. cd to /mnt/wsl/ubuntu-20.04/mnt/c/test_dir. it contains the second file

The same happens when I try to mount some dir from Windows

Expected Behavior

Content of mounted dir have to be passed into container

Actual Behavior

It works wrongly :(

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.