docker-desktop

Running powershell or cmd on docker container

安稳与你 提交于 2019-12-11 07:19:26
问题 I want to check the content of my docker container. I want to run a powershell or command prompt inside container so I can list directories. This container image is hosting ASP.NET Web API application using ASP.net 4.6.1 framework. I ran following commands: docker container ls - to list conatiners docker exec -i -t a1da40af6b3c powershell But nothing happens (as shown in the image). Am i missing anything? 回答1: ISE hosted powershell does not work properly with a bunch of things. So try to do

dial tcp lookup: no such host issue on docker windows desktop

半城伤御伤魂 提交于 2019-12-11 06:08:23
问题 I've installed docker on my office windows 10 Pro machine. I'm facing dial tcp lookup issue while trying to pull from the registry. Error response from daemon: Get https://registry-1.docker.io/v2/: dial tcp: lookup registry-1.docker.io on 192.168.65.1:53: no such host I've tried many possible solutions from online. But I couldn't figure out the issue. Can someone please help me regarding this issue. Thanks. 回答1: I got the same issue and the below settings worked for me. set proxy address as

Docker for Windows Swarm IIS Service with Win10 Insider running but unreachable

狂风中的少年 提交于 2019-12-08 10:32:06
问题 I'm currently experimenting with Swarm Services with Docker for Windows. The new Win10 Insider build supports overlay networking for Windows containers and I was pleased to see my IIS service actually starting. The only issue i came across is that i can not reach the service in the browser, despite trying multiple things such as different ports and networks. The command issued is as following: docker service create --name webfarm -p 80:80 microsoft/iis I have also tried to use the --network

Docker for Windows does not work with Volumes

拟墨画扇 提交于 2019-12-08 09:37:11
问题 I'm trying to create a project with ASP.NET Core, Docker Desktop for Windows and Visual Studio Docker Tools . So I've create a ASP.NET Core Empty Project and added Docker Support via context menu. My docker-compose.debug.yml looks like this: version: '2' services: aspnetcore_rtm_windows_docker_sample: image: username/aspnetcore_rtm_windows_docker_sample:Debug build: context: . dockerfile: Dockerfile.debug environment: - REMOTE_DEBUGGING=${REMOTE_DEBUGGING} ports: - "80:80" volumes: - .:/app

Access file of windows machine from docker container

寵の児 提交于 2019-12-08 07:02:28
问题 I have installed Docker Desktop for Windows in Windows 10 operating system. I am running a python script inside docker container which reads file from disk and add few text at the end of files. Now the requirement is to read files from Windows 10 and perform the same operation on it. Is it possible in docker to read files from OS on top of which Docker is running? 回答1: Of course, you can use volumes. For example, you can run the following command: docker run -v path/to/your/file/on/host:path

Cannot call chown inside Docker container (Docker for Windows)

和自甴很熟 提交于 2019-12-07 05:26:28
问题 I am attempting to use the official Mongo dockerfile to boot up a database, I am using the -v command to map a local directory to /data inside the container. As part of the Dockerfile , it attempts to chown this directory to the user mongodb: RUN mkdir -p /data/db /data/configdb \ && chown -R mongodb:mongodb /data/db /data/configdb VOLUME /data/db /data/configdb However, this fails with the following command: chown: changing ownership of '/data/db': Permission denied What I am doing wrong

How to pass parameters to a .NET core project with dockerfile

北战南征 提交于 2019-12-06 17:55:15
问题 I've got a .NET Core project (using visual studio and adding the docker files via the Visual Studio Tools for Docker). My DockerFile looks like this: FROM microsoft/dotnet:1.0.1-core ARG source=. WORKDIR /app COPY $source . ENTRYPOINT ["dotnet", "MyApp.dll"] CMD ["arg1", "arg2"] My question is, how do I pass parameters into the project? public static void Main(string[] args) { // how does `args` get populated? } 回答1: I used environment variables which can be set by docker-compse.yml too

Access file of windows machine from docker container

萝らか妹 提交于 2019-12-06 15:46:29
I have installed Docker Desktop for Windows in Windows 10 operating system. I am running a python script inside docker container which reads file from disk and add few text at the end of files. Now the requirement is to read files from Windows 10 and perform the same operation on it. Is it possible in docker to read files from OS on top of which Docker is running? Of course, you can use volumes . For example, you can run the following command: docker run -v path/to/your/file/on/host:path/to/the/file/on/container your_image The only approach to access the host file is that you can mount the

Cannot call chown inside Docker container (Docker for Windows)

a 夏天 提交于 2019-12-05 08:46:00
I am attempting to use the official Mongo dockerfile to boot up a database, I am using the -v command to map a local directory to /data inside the container. As part of the Dockerfile , it attempts to chown this directory to the user mongodb: RUN mkdir -p /data/db /data/configdb \ && chown -R mongodb:mongodb /data/db /data/configdb VOLUME /data/db /data/configdb However, this fails with the following command: chown: changing ownership of '/data/db': Permission denied What I am doing wrong here? I cannot find any documentation around this - surely the container should have full permissions to

How to pass parameters to a .NET core project with dockerfile

半腔热情 提交于 2019-12-04 23:28:11
I've got a .NET Core project (using visual studio and adding the docker files via the Visual Studio Tools for Docker ). My DockerFile looks like this: FROM microsoft/dotnet:1.0.1-core ARG source=. WORKDIR /app COPY $source . ENTRYPOINT ["dotnet", "MyApp.dll"] CMD ["arg1", "arg2"] My question is, how do I pass parameters into the project? public static void Main(string[] args) { // how does `args` get populated? } I used environment variables which can be set by docker-compse.yml too public static class EnvironmentHelper { public const string EnvironmentArguments = "DOTNETCORE_ARGUMENTS";