ハロの外部記憶インターフェイス

そろそろ覚える努力が必要かも…

MacでDockerを利用して.NET Coreを試す。

Dockerをインストールする。

DockerホームページからMacバージョンのDockerをインストールする。
docs.docker.com

Dockerより、.NET Coreを起動する。

localにない場合、最新バージョンがPullされる。

$ docker run -it microsoft/dotnet:latest
Unable to find image 'microsoft/dotnet:latest' locally
latest: Pulling from microsoft/dotnet
5c90d4a2d1a8: Pull complete 
ab30c63719b1: Pull complete 
c6072700a242: Pull complete 
f67da27a1b77: Pull complete 
182231dd5d6a: Pull complete 
e24ed66baf66: Pull complete 
Digest: sha256:afa88a72e371ed16cb7788302e87da31ae63d5652e82a48e3d2f2aec3c5eb63e
Status: Downloaded newer image for microsoft/dotnet:latest
root@2551a823ee15:/# 

コマンドをテストする

root@2551a823ee15:~# mkdir hwapp
root@2551a823ee15:~# cd hwapp
root@2551a823ee15:~/hwapp# dotnet new
Created new C# project in /root/hwapp.
root@2551a823ee15:~/hwapp# ls
Program.cs  project.json
root@2551a823ee15:~/hwapp# dotnet restore
log  : Restoring packages for /root/hwapp/project.json...
log  : Writing lock file to disk. Path: /root/hwapp/project.lock.json
log  : /root/hwapp/project.json
log  : Restore completed in 822ms.
root@2551a823ee15:~/hwapp# dotnet run
Project hwapp (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling hwapp for .NETCoreApp,Version=v1.0

Compilation succeeded.
    0 Warning(s)
    0 Error(s)

Time elapsed 00:00:01.2672051
 

Hello World!
root@2551a823ee15:~/hwapp#