docker-for-windows

Windows - Docker CMD does not execute

≯℡__Kan透↙ 提交于 2020-01-25 00:16:08
问题 For the life of me, I cannot seem to get my provisioning script to execute when I run my container. Down the road, I will need to pass in arguments to the docker run command to replace 'hiiii' and '123' for multiple container deployments. This is my docker file FROM microsoft/aspnet:3.5-windowsservercore-10.0.14393.1198 SHELL [“powershell”, “-Command”, “$ErrorActionPreference = ‘Stop’; $ProgressPreference = ‘SilentlyContinue’;”] COPY *.ps1 /Container/ COPY [“wwwroot”, “/inetpub/wwwroot”] COPY

Container File Permissions in Windows Container

我怕爱的太早我们不能终老 提交于 2020-01-24 04:19:06
问题 I've got a Windows Docker container ( microsoft/aspnet ) that is hosting a simple Web API. The web API accepts files from a form, saves them in a temp folder, does some processing, and then returns the result. This works fine when deployed locally, but when done in my Docker container, I get a file permissions error on my temp folder ( App_Data ). Is there a way to grant the IIS user the code is running as access to this file, or to open up the folder to any user for read/write access?

Can't start docker on windows

拥有回忆 提交于 2020-01-23 11:00:12
问题 I continue to get the following error when trying to start docker on Windows 10 pro. my HyperV is turned on and running: Version 18.04.0-ce-win62 (17151) Channel: edge e0a85f6 Any help would be appreciated! Unable to create: The running command stopped because the preference variable "ErrorActionPreference" or common parameter is set to Stop: Hyper-V encountered an error trying to access an object on computer 'C001715587' because the object was not found. The object might have been deleted.

Dotnetcore container errors on startup asking if I mean to run SDK commands

╄→гoц情女王★ 提交于 2020-01-15 01:53:09
问题 I'm creating a simple dotnetcore 2.0 application and I want to containerize it. The idea being this container will run once on deployment to do some application configuration tasks. At present, the code just does this... class Program { static void Main(string[] args) { Console.WriteLine("Hello World!"); } } The docker file looks like this... FROM microsoft/dotnet:2.0-runtime ARG source WORKDIR /app COPY ${source:-obj/Docker/publish} . ENTRYPOINT ["dotnet", "consoleapp.dll"] I hit F5 in

Call Microservice from another Microservice within Docker

柔情痞子 提交于 2020-01-14 02:50:06
问题 I created several Microservices in C# that are running on docker in windows, I need to call Microservice from another Microservice so I used this way to call: [HttpGet("GetOrder/{Object_ID}")] public Order GetOrder (int id) { string Baseurl = "http://189.29.0.100/"; ….. using (var client = new HttpClient()) { //Passing service base url client.BaseAddress = new Uri(Baseurl); client.DefaultRequestHeaders.Clear(); //Define request data format client.DefaultRequestHeaders.Accept.Add(new

Invalid mount config for type “bind”: bind source path does not exist when trying to run container on Docker for Windows

北慕城南 提交于 2020-01-13 00:30:35
问题 I'm trying to run the Prometheus sample at https://docs.docker.com/engine/admin/prometheus/#use-prometheus using Docker on Windows. I'm executing the following command: docker service create --replicas 1 --name my-prometheus ` --mount type=bind,source="C:/temp/prometheus.yml",destination=/etc/prometheus/prometheus.yml ` --publish published=9090,target=9090,protocol=tcp ` prom/prometheus The error is: invalid mount config for type "bind": bind source path does not exist I'm pretty certain the

Mounting a local folder in docker results in an empty directory

允我心安 提交于 2020-01-06 06:41:22
问题 First my setup: windows 10 (1709 16299.967) wsl (ubuntu 18.04) docker for windows 2.0.0.2 (30215) Engine 18.09.1 I'm trying to mount a local development folder as a volume within a docker container but the mounted directory is always empty. I have enabled the shared drive setting for c:/ through the docker for windows settings dialog. I have tried mounting the local directory through WSL and powershell with no luck in either case. The commands I have tried are : docker run -it -v /c/code

How to copy files from server to docker container

蓝咒 提交于 2020-01-06 06:19:28
问题 I am trying to create a Windows Nano Server container and copy some files from server to the new container. Below is my dockerfile code: FROM microsoft/nanoserver MAINTAINER test@gmail.com COPY C:/files/ C:/files/ When I run it, I am getting below error: Copy failed:createFile \?\c:\programdata\Docker\tmp\docker-builder78565487\files: The system canot find the path specified. How do I declare source location in COPY command, so it uses absolute path and copy files to c:\files location on my

How to copy files from server to docker container

流过昼夜 提交于 2020-01-06 06:19:08
问题 I am trying to create a Windows Nano Server container and copy some files from server to the new container. Below is my dockerfile code: FROM microsoft/nanoserver MAINTAINER test@gmail.com COPY C:/files/ C:/files/ When I run it, I am getting below error: Copy failed:createFile \?\c:\programdata\Docker\tmp\docker-builder78565487\files: The system canot find the path specified. How do I declare source location in COPY command, so it uses absolute path and copy files to c:\files location on my

Docker - Windows Container Not Resolving Hosts

狂风中的少年 提交于 2020-01-05 08:30:29
问题 I have set up two new projects in Visual Studio using the Docker tooling. The first is a asp.net site running against a Linux container. The second is an asp.net site running against a Windows container. In the former, I can ping hostnames (ex: google.com) and it resolves just fine. However, when running the windows container I cannot do the same thing. I am running a custom network so that I can ensure the container starts up on the subnet I want: docker network create --driver=nat --subnet