Coder Social home page Coder Social logo

Comments (5)

duanqiao12138 avatar duanqiao12138 commented on August 26, 2024 1

change -it to -itd

from windows.

3038843920 avatar 3038843920 commented on August 26, 2024 1

The example command contains -rm which means it removes the container if you exit the command. So to keep it running, just run the same command without -rm.

But this question is more about how Docker works, it has nothing to do with this container.

Understanding. I have added the - d parameter as mentioned by the senior below, and the problem has been resolved. Nevertheless, I am very grateful for taking the time to respond to my request for help

from windows.

kroese avatar kroese commented on August 26, 2024

The example command contains -rm which means it removes the container if you exit the command. So to keep it running, just run the same command without -rm.

But this question is more about how Docker works, it has nothing to do with this container.

from windows.

3038843920 avatar 3038843920 commented on August 26, 2024

change -it to -itd

I didn't know much about this command before, thank you very much for telling me about it

from windows.

xiaoweiChen avatar xiaoweiChen commented on August 26, 2024

@3038843920
I want to know how to connect the windows container with SSH, and use command line to do some operation in Windows system.
Could you share the way for me? Need install some software like openSSH on Windows?

ssh worked on win11 docker now.

  1. open powershell as admin
  2. type in Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*', the output like below:
PS C:\Windows\system32> Get-WindowsCapability -Online | Where-Object Name -like  'OpenSSH*'                                                                                                                                                                                                                                                                             Name  : OpenSSH.Client~~~~0.0.1.0                                                                                       State : Installed                                                                                                                                                                                                                               Name  : OpenSSH.Server~~~~0.0.1.0                                                                                       State : NotPresent
  1. type in Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 install ssh server
  2. type in Get-WindowsCapability -Online | Where-Object Name -like 'OpenSSH*', the output like below:
PS C:\Windows\system32> Get-WindowsCapability -Online | Where-Object Name -like  'OpenSSH*'                                                                                                                                                                                                                                                                             Name  : OpenSSH.Client~~~~0.0.1.0                                                                                       State : Installed                                                                                                                                                                                                                               Name  : OpenSSH.Server~~~~0.0.1.0                                                                                       State : Installed
  1. type in net start sshd, ssh worked now.

from windows.

Related Issues (20)

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.