Giter VIP home page Giter VIP logo

dotnet-demos / wcf-netnamedpipe-container Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 43 KB

Shows how an external facing WCF service hosted inside container can call other service via netnamedpipe binding

License: MIT License

Dockerfile 1.81% C# 94.90% ASP.NET 0.95% PowerShell 2.33%
dotnet-framework dotnet-framework-48 iis iis-server namedpipe service-to-service wcf wcf-bindings wcf-service windows-containers netnamedpipebinding container containerization containers

wcf-netnamedpipe-container's Introduction

wcf-netnamedpipe-container

Shows how an external facing WCF service hosted inside windows container can call other service via netnamedpipe binding.

What it demos

  • We can host netNamedPipe binding inside Windows container.
  • IIS running inside Windows container can host WCF services using netNamedPipe binding.
  • A service/process hosted in Windows container can call another service hosted in same container using netNamedPipe binding.

Getting started

CI outside of Docker build

Here we need to compile the application outside of Docker build. The Dockerfile only has the instructions to package binaries.

  • Clone the repo and compile the solution
  • Run the below command from root folder (the folder where .sln file resides) to build container image.
    • docker build -t wcf -f Dockerfile.combined.dev .
  • To run container give command docker run --name testwcf -p 82:80 -d wcf:latest
  • Navigate to http://localhost:82/FrontEndWCFService/FrontEndService.svc/areaOf/3/delay/1 to see it in action

CI via Docker build using SDK container.

Here we just issue the Docker build command that will copy source to SDK container, compile the application inside of SDK container. Then the runtime imaage is prepared by copying binaries.

Prerequisite

  • Docker environment with Windows containers support. Better Docker Desktop.
  • Basic knowledge about containers.

Points to note

  • The base WCF container that is provided by MSFT is not enabled with netNamedPipeBinding. We need to enable ourselves.
  • While enabling the net.pipe binding, we need to set the IIS bindings at site level and protocols enablement at Web Application level.

Design notes

  • The Docker image is not layered to include internal service in base image and frontend WCF service in other container. It is advised to have a base container that has only internal service and give to other teams that develop front end services.
  • No side car pattern at container level - It uses service to host helping component.

Hosting your own base container

Currently the application image uses a base container (that enabled netNamedPipe in IIS) that is hosted under user joymon. If you want to host the base image, please

  • Build the Dockerfile.base
  • Push to your own docker hub repo or ACR
  • Change the Dockerfile.combined.* images to use your newly pushed image.

wcf-netnamedpipe-container's People

Contributors

joymon avatar

Watchers

 avatar

wcf-netnamedpipe-container's Issues

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.