Giter Club home page Giter Club logo

petshopvnext's Introduction

.NET Pet Shop - Running in Docker

This is the 5.0 version of the Pet Shop, which was updated to .NET 3.5 in AD 2008.

In this repo there is a Dockerfile for the web application and a Dockerfile for the SQL Server database. You can run this 10-year old app in Windows Docker containers.

There's just one code change from the original 2008 version, which is to add an alternative order processor that doesn't use transactions. This is only needed when you're running the database in a container, because SQL Server containers don't support MSDTC.

Usage

You can compile and run the whole app in containers. You don't need SQL Server or .NET 3.5 installed, you just need Docker Desktop on Windows 10 with update 1809, or Docker Enterprise on Windows Server 2019.

Start by cloning this repo and switching to the directory:

git clone https://github.com/sixeyed/petshopvnext.git

cd petshopvnext

Then use Docker Compose to build the app (you can skip this step and just use the public images on Docker Hub):

docker-compose `
  -f .\app\docker-compose.yml `
  -f .\app\docker-compose-build.yml `
  build

Then start the app with Compose:

docker-compose -f .\app\docker-compose.yml up -d

Browse to http://localhost:8010 to see the app:

.NET PetShop running on Windows Docker containers

Everything works, including the checkout function and the RSS feeds (which are running in a WCF service).

Windows Server 2016

The app also runs in Docker on Windows Server 2016, with some Compose file overrides.

Build:

docker-compose `
  -f .\app\docker-compose.yml `
  -f .\app\docker-compose-build-2016.yml `
  build

Run:

docker-compose `
  -f .\app\docker-compose.yml `
  -f .\app\docker-compose-2016.yml `
  up -d

On Windows Server 2016 you'll need to get the IP address of the container and browse to it:

docker container inspect --format '{{ .NetworkSettings.Networks.nat.IPAddress }}' app_petshop-web_1

Credits

Original source code from petshopvnext on the CodePlex archive.

petshopvnext's People

Contributors

sixeyed avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

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.