- manages the whole app lifecycle -- start, stop, and rebuilding services -- view status of running services -- stream the log output of running services -- run a one-off command on a service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/core/sdk | |
LABEL key="Kyle Morton" | |
ENV ASPNETCORE_URLS=http://*:5000 | |
ENV DOTNET_USE_POLLING_FILE_WATCHER=1 | |
ENV ASPNETCORE_ENVIRONMENT=development | |
WORKDIR /app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-nanoserver-1909 AS base | |
WORKDIR /app | |
EXPOSE 5000 | |
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-nanoserver-1909 AS build | |
WORKDIR /src | |
COPY ["docker-mvc.csproj", "./"] | |
RUN dotnet restore "./docker-mvc.csproj" | |
COPY . . | |
WORKDIR "/src/." |
Dockerfiles represent a way to create an image w/ a layered file system using 1 or more existing images along w/ steps to build/copy files and dependencies.
Easy way to autogenerate a production ready .dockerfile in VS Code -
- open project folder in vscode
- install both the docker & C# (omnisharp) extensions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var strCmdText = "/C youtube-dl -i --extract-audio --audio-format mp3 --audio-quality 0 {YOUTUBE_URL}; | |
System.Diagnostics.Process.Start("CMD.exe", strCmdText); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
var str = "Hello, playground" | |
func sayTitle(title: String) { | |
print("Title: \(title)") | |
} | |
class Movie { | |
var title: String? |