Docker Community Forums

Share and learn in the Docker community.

How to: set up Docker server, set up Visual Studio, start to publish ASP.NET to Docker?


(Yaapelsinko) #1

Hello. I’m a poor little developer and all I want is to set up an Ubuntu server with only ssh, mc and Docker installed. And then to be able to publish containers from Visual Studio and don’t touch the server at all.

So I need:

  1. Install Docker on Ubuntu - plenty of manuals, for example: hxxp://blog.tonysneed.com/2015/05/25/develop-and-deploy-asp-net-5-apps-to-docker-on-linux/ For me it ends (I think) at the point he going do “dockerize” something, but okay, at least I have the Docker installed.

  2. Somehow find a way to publish VS projects to Docker. Again, plenty of manuals: hxxp://www.hanselman.com/blog/PublishingAnASPNET5AppToDockerOnLinuxWithVisualStudio.aspx

(sorry for links - a new user’s limitation)

  1. And the problem is when I finally choose “Publish”, specifying connection and other stuff, it fails checking connection. So, Docker out of the box isn’t ready to receive deployments from VS? What do I need to fill the gap?

Some details:
1.Docker was installed with these exact commands with no further configuration:

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys
36A1D7869245C8950F966E92D8576A8BA88D21E9
sudo sh -c "echo deb hxxps://get.docker.com/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
sudo apt-get update
sudo apt-get install lxc-docker

2.What I’m deploying is ASP.NET 5 beta 7 app, specifying:
•URL: tcp://19.85.23.13:2376
•Image: microsoft/aspnet
And leaving other parameters default. What I get is error:

An error occured during publish. The command [docker -H tcp://19.85.23.13:2376 build -t microsoft/aspnet -f “C:\Users\adski\AppData\Local\Temp\PublishTemp\DockTest185\approot\src\DockTest1\Dockerfile” “C:\Users\adski\AppData\Local\Temp\PublishTemp\DockTest185”] exited with code [1]: Post hxxp://19.85.23.13:2376/v1.20/build?cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=approot%2Fsrc%2FDockTest1%2FDockerfile&memory=0&memswap=0&rm=1&t=microsoft%2Faspnet&ulimits=null: dial tcp 19.85.23.13:2376: ConnectEx tcp: No connection could be made because the target machine actively refused it… * Are you trying to connect to a TLS-enabled daemon without TLS? * Is your docker daemon up and running?
Please visit hxxp://go.microsoft.com/fwlink/?LinkID=529706 for troubleshooting guide.

Well I’m not really a web-security expert. I’ve found this: https://docs.docker.com/articles/https/

Er, is this really that complicated? But goddamit, none of those asp.net/docker tutorials mentioned that. Guides for dummies, pleeease?