Coder Social home page Coder Social logo

docker-templates's Introduction

docker-templates

This repo is a introduction of using Docker as a platform for development. with 4 difference scenarios. You can find more details in this medium blog.

  1. Add docker to local project.
  2. Add docker to Asp.Net Core project.
  3. Add docker to Python project.
  4. Add docker to Data Science project.
1. Local Project
# Linux, Mac, and WSL
docker run -d -p 8080:5063 -v $(pwd):/var/www -w "/var/www" mcr.microsoft.com/dotnet/sdk bash -c "dotnet watch run"

# PowerShell
docker run -d -p 8080:5063 -v ${PWD}:/var/www -w "/var/www" mcr.microsoft.com/dotnet/sdk bash -c "dotnet watch run"
2. Asp.Net Core Project
# Build the image using:
docker build -t aspnetcore-sdk .

# Run the image using:
docker run -d -p 5199:5199 -v ${PWD}:/app aspnetcore-sdk
3.Python Project
# Go to local folder
cd..

# Build the image:
docker build . -t python_flask

# Get the IMAGEID:
docker images

# Create Container
docker run -d -p 5000:5000 [IMAGEID]

# Stop Container
docker stop [IMAGEID]
4. Data Science Docker
# Build the image:
$ docker build . -t datascience

# Get the IMAGEID:
docker images

# Create Container
docker run -it -v ${PWD}:/home/jupyter -p 8888:8888 [IMAGEID]

# Stop Container
docker stop [IMAGEID]

docker-templates's People

Contributors

sandropucp avatar

Stargazers

Sandro SS avatar

Watchers

 avatar Sandro SS 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.