Communication between Windows Host and Linux Docker Container












4















enter image description hereI have the following problem. I have a piece of software on a windows host system, which emulates the com-interface at this computer. Now i would like to provide a API / Socket / Pipe in this software, which accepts a string which is transfered over LAN.



The submit software should be a .net core webapplication, which is hosted in kubernetes as a docker container (Linux).



Which kind of technology could i use to speak between a Linux Container and a Windows Host.




  1. Named Pipes -> I think they are not available under Linux?

  2. Sockets?

  3. Try to open a webserver on the windows host to get access via http ?


Whats your ideas and why do you prefer a solution?










share|improve this question

























  • You could use many different ways. A webservice is a fine way of doing it as you said. Named pipes do not go outside of computers, virtual or or otherwise, so that is right out.

    – Prof. Falken
    Nov 22 '18 at 9:18
















4















enter image description hereI have the following problem. I have a piece of software on a windows host system, which emulates the com-interface at this computer. Now i would like to provide a API / Socket / Pipe in this software, which accepts a string which is transfered over LAN.



The submit software should be a .net core webapplication, which is hosted in kubernetes as a docker container (Linux).



Which kind of technology could i use to speak between a Linux Container and a Windows Host.




  1. Named Pipes -> I think they are not available under Linux?

  2. Sockets?

  3. Try to open a webserver on the windows host to get access via http ?


Whats your ideas and why do you prefer a solution?










share|improve this question

























  • You could use many different ways. A webservice is a fine way of doing it as you said. Named pipes do not go outside of computers, virtual or or otherwise, so that is right out.

    – Prof. Falken
    Nov 22 '18 at 9:18














4












4








4


2






enter image description hereI have the following problem. I have a piece of software on a windows host system, which emulates the com-interface at this computer. Now i would like to provide a API / Socket / Pipe in this software, which accepts a string which is transfered over LAN.



The submit software should be a .net core webapplication, which is hosted in kubernetes as a docker container (Linux).



Which kind of technology could i use to speak between a Linux Container and a Windows Host.




  1. Named Pipes -> I think they are not available under Linux?

  2. Sockets?

  3. Try to open a webserver on the windows host to get access via http ?


Whats your ideas and why do you prefer a solution?










share|improve this question
















enter image description hereI have the following problem. I have a piece of software on a windows host system, which emulates the com-interface at this computer. Now i would like to provide a API / Socket / Pipe in this software, which accepts a string which is transfered over LAN.



The submit software should be a .net core webapplication, which is hosted in kubernetes as a docker container (Linux).



Which kind of technology could i use to speak between a Linux Container and a Windows Host.




  1. Named Pipes -> I think they are not available under Linux?

  2. Sockets?

  3. Try to open a webserver on the windows host to get access via http ?


Whats your ideas and why do you prefer a solution?







linux windows docker .net-core






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 20 '18 at 7:23







Lukas Hieronimus Adler

















asked Nov 20 '18 at 7:17









Lukas Hieronimus AdlerLukas Hieronimus Adler

4761725




4761725













  • You could use many different ways. A webservice is a fine way of doing it as you said. Named pipes do not go outside of computers, virtual or or otherwise, so that is right out.

    – Prof. Falken
    Nov 22 '18 at 9:18



















  • You could use many different ways. A webservice is a fine way of doing it as you said. Named pipes do not go outside of computers, virtual or or otherwise, so that is right out.

    – Prof. Falken
    Nov 22 '18 at 9:18

















You could use many different ways. A webservice is a fine way of doing it as you said. Named pipes do not go outside of computers, virtual or or otherwise, so that is right out.

– Prof. Falken
Nov 22 '18 at 9:18





You could use many different ways. A webservice is a fine way of doing it as you said. Named pipes do not go outside of computers, virtual or or otherwise, so that is right out.

– Prof. Falken
Nov 22 '18 at 9:18












1 Answer
1






active

oldest

votes


















0














Linux do have named pipes, though the exact semantic of different operations vary, but the problem you'll have is that named pipe cannot be used to communicate between different systems. Named pipe is an inter-process communication for process running on the same machine. Note that Windows Host and Linux Guest are considered two separate systems here even when they live in the same physical machines.



TCP is the most general purpose form of sockets and is the standard way to connect between two OSes. If you don't know why you want to use the other protocols, TCP is usually a good bet that it'll be able to connect almost everything.



Now the only problem is what application level protocol you want to use, and whether you want to add any security layer (i.e. TLS) to encrypt and authenticate the connection between the machines. If you have a simple service that only needs to transmit simple strings, then you probably can just use TCP/TLS socket directly, but if you want to benefit from standardized phraseology, techniques, and libraries and frameworks for various things like communicating request and responses statuses, authentication, optimistic locking, caching, proxying, session management, arbitrary length stream encoding, etc, then building your communication on top of HTTP/HTTPS is a sensible thing to do. You'll find that a lot of services nowadays are built as a web service as it makes things a lot simpler when you need to scale and make use of those features.






share|improve this answer
























  • @LukasHieronimusAdler: nope, doesn't change my answer one bit. If your machine is capable of running Windows, it's definitely way more than capable of running a simple TCP/HTTP server. There's likely many such services already running on your machine providing various system services. You can fairly easily write a standalone server in nearly any language/platform of your choosing, it's simpler than you think. I think you might be overthinking this a bit. A server is simply a program that listens for requests from another program/machine.

    – Lie Ryan
    Nov 22 '18 at 13:37











  • Okay and how could i do it? So i need a Windows Service for Windows 7 / 10 which creates his own server. Which kind of "project" should i choose in .NET for this? WCF , .NET Standard, Windows Desktop? And could you give me a reference?

    – Lukas Hieronimus Adler
    Nov 22 '18 at 14:40











  • Any of them can be used to write a server, though for a simple server you probably won't need a GUI project. This tutorial explains the entire process of writing a simple server that uses a database and an in-browser client.

    – Lie Ryan
    Nov 22 '18 at 15:20











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53388011%2fcommunication-between-windows-host-and-linux-docker-container%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Linux do have named pipes, though the exact semantic of different operations vary, but the problem you'll have is that named pipe cannot be used to communicate between different systems. Named pipe is an inter-process communication for process running on the same machine. Note that Windows Host and Linux Guest are considered two separate systems here even when they live in the same physical machines.



TCP is the most general purpose form of sockets and is the standard way to connect between two OSes. If you don't know why you want to use the other protocols, TCP is usually a good bet that it'll be able to connect almost everything.



Now the only problem is what application level protocol you want to use, and whether you want to add any security layer (i.e. TLS) to encrypt and authenticate the connection between the machines. If you have a simple service that only needs to transmit simple strings, then you probably can just use TCP/TLS socket directly, but if you want to benefit from standardized phraseology, techniques, and libraries and frameworks for various things like communicating request and responses statuses, authentication, optimistic locking, caching, proxying, session management, arbitrary length stream encoding, etc, then building your communication on top of HTTP/HTTPS is a sensible thing to do. You'll find that a lot of services nowadays are built as a web service as it makes things a lot simpler when you need to scale and make use of those features.






share|improve this answer
























  • @LukasHieronimusAdler: nope, doesn't change my answer one bit. If your machine is capable of running Windows, it's definitely way more than capable of running a simple TCP/HTTP server. There's likely many such services already running on your machine providing various system services. You can fairly easily write a standalone server in nearly any language/platform of your choosing, it's simpler than you think. I think you might be overthinking this a bit. A server is simply a program that listens for requests from another program/machine.

    – Lie Ryan
    Nov 22 '18 at 13:37











  • Okay and how could i do it? So i need a Windows Service for Windows 7 / 10 which creates his own server. Which kind of "project" should i choose in .NET for this? WCF , .NET Standard, Windows Desktop? And could you give me a reference?

    – Lukas Hieronimus Adler
    Nov 22 '18 at 14:40











  • Any of them can be used to write a server, though for a simple server you probably won't need a GUI project. This tutorial explains the entire process of writing a simple server that uses a database and an in-browser client.

    – Lie Ryan
    Nov 22 '18 at 15:20
















0














Linux do have named pipes, though the exact semantic of different operations vary, but the problem you'll have is that named pipe cannot be used to communicate between different systems. Named pipe is an inter-process communication for process running on the same machine. Note that Windows Host and Linux Guest are considered two separate systems here even when they live in the same physical machines.



TCP is the most general purpose form of sockets and is the standard way to connect between two OSes. If you don't know why you want to use the other protocols, TCP is usually a good bet that it'll be able to connect almost everything.



Now the only problem is what application level protocol you want to use, and whether you want to add any security layer (i.e. TLS) to encrypt and authenticate the connection between the machines. If you have a simple service that only needs to transmit simple strings, then you probably can just use TCP/TLS socket directly, but if you want to benefit from standardized phraseology, techniques, and libraries and frameworks for various things like communicating request and responses statuses, authentication, optimistic locking, caching, proxying, session management, arbitrary length stream encoding, etc, then building your communication on top of HTTP/HTTPS is a sensible thing to do. You'll find that a lot of services nowadays are built as a web service as it makes things a lot simpler when you need to scale and make use of those features.






share|improve this answer
























  • @LukasHieronimusAdler: nope, doesn't change my answer one bit. If your machine is capable of running Windows, it's definitely way more than capable of running a simple TCP/HTTP server. There's likely many such services already running on your machine providing various system services. You can fairly easily write a standalone server in nearly any language/platform of your choosing, it's simpler than you think. I think you might be overthinking this a bit. A server is simply a program that listens for requests from another program/machine.

    – Lie Ryan
    Nov 22 '18 at 13:37











  • Okay and how could i do it? So i need a Windows Service for Windows 7 / 10 which creates his own server. Which kind of "project" should i choose in .NET for this? WCF , .NET Standard, Windows Desktop? And could you give me a reference?

    – Lukas Hieronimus Adler
    Nov 22 '18 at 14:40











  • Any of them can be used to write a server, though for a simple server you probably won't need a GUI project. This tutorial explains the entire process of writing a simple server that uses a database and an in-browser client.

    – Lie Ryan
    Nov 22 '18 at 15:20














0












0








0







Linux do have named pipes, though the exact semantic of different operations vary, but the problem you'll have is that named pipe cannot be used to communicate between different systems. Named pipe is an inter-process communication for process running on the same machine. Note that Windows Host and Linux Guest are considered two separate systems here even when they live in the same physical machines.



TCP is the most general purpose form of sockets and is the standard way to connect between two OSes. If you don't know why you want to use the other protocols, TCP is usually a good bet that it'll be able to connect almost everything.



Now the only problem is what application level protocol you want to use, and whether you want to add any security layer (i.e. TLS) to encrypt and authenticate the connection between the machines. If you have a simple service that only needs to transmit simple strings, then you probably can just use TCP/TLS socket directly, but if you want to benefit from standardized phraseology, techniques, and libraries and frameworks for various things like communicating request and responses statuses, authentication, optimistic locking, caching, proxying, session management, arbitrary length stream encoding, etc, then building your communication on top of HTTP/HTTPS is a sensible thing to do. You'll find that a lot of services nowadays are built as a web service as it makes things a lot simpler when you need to scale and make use of those features.






share|improve this answer













Linux do have named pipes, though the exact semantic of different operations vary, but the problem you'll have is that named pipe cannot be used to communicate between different systems. Named pipe is an inter-process communication for process running on the same machine. Note that Windows Host and Linux Guest are considered two separate systems here even when they live in the same physical machines.



TCP is the most general purpose form of sockets and is the standard way to connect between two OSes. If you don't know why you want to use the other protocols, TCP is usually a good bet that it'll be able to connect almost everything.



Now the only problem is what application level protocol you want to use, and whether you want to add any security layer (i.e. TLS) to encrypt and authenticate the connection between the machines. If you have a simple service that only needs to transmit simple strings, then you probably can just use TCP/TLS socket directly, but if you want to benefit from standardized phraseology, techniques, and libraries and frameworks for various things like communicating request and responses statuses, authentication, optimistic locking, caching, proxying, session management, arbitrary length stream encoding, etc, then building your communication on top of HTTP/HTTPS is a sensible thing to do. You'll find that a lot of services nowadays are built as a web service as it makes things a lot simpler when you need to scale and make use of those features.







share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 22 '18 at 11:07









Lie RyanLie Ryan

44.7k968122




44.7k968122













  • @LukasHieronimusAdler: nope, doesn't change my answer one bit. If your machine is capable of running Windows, it's definitely way more than capable of running a simple TCP/HTTP server. There's likely many such services already running on your machine providing various system services. You can fairly easily write a standalone server in nearly any language/platform of your choosing, it's simpler than you think. I think you might be overthinking this a bit. A server is simply a program that listens for requests from another program/machine.

    – Lie Ryan
    Nov 22 '18 at 13:37











  • Okay and how could i do it? So i need a Windows Service for Windows 7 / 10 which creates his own server. Which kind of "project" should i choose in .NET for this? WCF , .NET Standard, Windows Desktop? And could you give me a reference?

    – Lukas Hieronimus Adler
    Nov 22 '18 at 14:40











  • Any of them can be used to write a server, though for a simple server you probably won't need a GUI project. This tutorial explains the entire process of writing a simple server that uses a database and an in-browser client.

    – Lie Ryan
    Nov 22 '18 at 15:20



















  • @LukasHieronimusAdler: nope, doesn't change my answer one bit. If your machine is capable of running Windows, it's definitely way more than capable of running a simple TCP/HTTP server. There's likely many such services already running on your machine providing various system services. You can fairly easily write a standalone server in nearly any language/platform of your choosing, it's simpler than you think. I think you might be overthinking this a bit. A server is simply a program that listens for requests from another program/machine.

    – Lie Ryan
    Nov 22 '18 at 13:37











  • Okay and how could i do it? So i need a Windows Service for Windows 7 / 10 which creates his own server. Which kind of "project" should i choose in .NET for this? WCF , .NET Standard, Windows Desktop? And could you give me a reference?

    – Lukas Hieronimus Adler
    Nov 22 '18 at 14:40











  • Any of them can be used to write a server, though for a simple server you probably won't need a GUI project. This tutorial explains the entire process of writing a simple server that uses a database and an in-browser client.

    – Lie Ryan
    Nov 22 '18 at 15:20

















@LukasHieronimusAdler: nope, doesn't change my answer one bit. If your machine is capable of running Windows, it's definitely way more than capable of running a simple TCP/HTTP server. There's likely many such services already running on your machine providing various system services. You can fairly easily write a standalone server in nearly any language/platform of your choosing, it's simpler than you think. I think you might be overthinking this a bit. A server is simply a program that listens for requests from another program/machine.

– Lie Ryan
Nov 22 '18 at 13:37





@LukasHieronimusAdler: nope, doesn't change my answer one bit. If your machine is capable of running Windows, it's definitely way more than capable of running a simple TCP/HTTP server. There's likely many such services already running on your machine providing various system services. You can fairly easily write a standalone server in nearly any language/platform of your choosing, it's simpler than you think. I think you might be overthinking this a bit. A server is simply a program that listens for requests from another program/machine.

– Lie Ryan
Nov 22 '18 at 13:37













Okay and how could i do it? So i need a Windows Service for Windows 7 / 10 which creates his own server. Which kind of "project" should i choose in .NET for this? WCF , .NET Standard, Windows Desktop? And could you give me a reference?

– Lukas Hieronimus Adler
Nov 22 '18 at 14:40





Okay and how could i do it? So i need a Windows Service for Windows 7 / 10 which creates his own server. Which kind of "project" should i choose in .NET for this? WCF , .NET Standard, Windows Desktop? And could you give me a reference?

– Lukas Hieronimus Adler
Nov 22 '18 at 14:40













Any of them can be used to write a server, though for a simple server you probably won't need a GUI project. This tutorial explains the entire process of writing a simple server that uses a database and an in-browser client.

– Lie Ryan
Nov 22 '18 at 15:20





Any of them can be used to write a server, though for a simple server you probably won't need a GUI project. This tutorial explains the entire process of writing a simple server that uses a database and an in-browser client.

– Lie Ryan
Nov 22 '18 at 15:20


















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53388011%2fcommunication-between-windows-host-and-linux-docker-container%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

android studio warns about leanback feature tag usage required on manifest while using Unity exported app?

SQL update select statement

'app-layout' is not a known element: how to share Component with different Modules