for-win icon indicating copy to clipboard operation
for-win copied to clipboard

Error: The application to execute does not exist

Open ghost opened this issue 8 years ago • 7 comments

Overview

I am just creating my first docker image and container. I follow the documents / videos. Running my first container results into following.

Expected behavior

Should run docker container

Actual behavior

Error: The application to execute does not exist: C:\ProgramData\Docker\containers\ContainerApp.dll

Information

  • Diagnostic ID: DCA4DF65-2BB7-420E-96C0-52AD7169B150/2018-01-11_19-19-56
  • OS: Windows 10 with Docker for windows

Dockerfile

FROM microsoft/aspnetcore:2.0
WORKDIR /ProgramData/Docker/containers
EXPOSE 5000/tcp
ENTRYPOINT ["dotnet", "ContainerApp.dll"]

Steps to reproduce the behavior

  1. Create new .net core project with Docker enable.
  2. Build using: docker build -t myapp .
  3. Run image using: docker run -d -p 5000:80 --name docrun myapp

ghost avatar Jan 11 '18 14:01 ghost

I experience exactly the same problem.

Microsoft Windows 10 Pro - 10.0.16299 Build 16299

Client: Version: 18.02.0-ce API version: 1.36 Go version: go1.9.3 Git commit: fc4de44 Built: Wed Feb 7 21:12:53 2018 OS/Arch: windows/amd64 Experimental: false Orchestrator: swarm

Server: Engine: Version: 18.02.0-ce API version: 1.36 (minimum version 1.24) Go version: go1.9.3 Git commit: fc4de44 Built: Wed Feb 7 21:26:24 2018 OS/Arch: windows/amd64 Experimental: true

After sucesfull build: docker build -t web . I get error when trying to run docker run -ti web. Error:

The application to execute does not exist: 'C:\app\Web.dll'

Dockerfile:

# Stage 1
FROM microsoft/aspnetcore-build AS builder
WORKDIR /source

# caches restore result by copying csproj file separately
COPY Web.sln ./src/aspdocker/Web.sln

COPY Web.Library/Web.Library.csproj ./src/aspdocker/Web.Library/
COPY Web.Core/Web.Core.csproj ./src/aspdocker/Web.Core/
COPY Web.Hosting/Web.Hosting.csproj ./src/aspdocker/Web.Hosting/
COPY Web.Library.Tests/Web.Library.Tests.csproj ./src/aspdocker/Web.Library.Tests/
COPY Web.Core.Tests/Web.Core.Tests.csproj ./src/aspdocker/Web.Core.Tests/

# caches restore result by copying csproj file separately
RUN dotnet restore ./src/aspdocker/Web.sln

# copies the rest of your code
COPY . .

RUN dotnet publish --output /app/


# Stage 2
#FROM microsoft/aspnetcore:1.1.2
FROM microsoft/aspnetcore
WORKDIR /app
COPY --from=builder /app .
#EXPOSE 5000/tcp
ENTRYPOINT ["dotnet", "Web.dll"]

Is there an option to list files? I want to check path and where dll is. I couldn't find solution on Google.

@sw-ms-dhaivatajwaliya Did you solve the problem?

MaklaCof avatar Feb 17 '18 08:02 MaklaCof

Did anyone solve this problem? I get the same issue. it says The application to execute does not exist: 'C:\app\bin\Debug\netcoreapp2.0\MyProject.dll'. But when I go into the container using powershell I can actually see the dll there in the same exact folder.

KasunKoswattha avatar May 01 '18 14:05 KasunKoswattha

I restarted Docker. That fixed my issue.

KasunKoswattha avatar May 01 '18 17:05 KasunKoswattha

Did anyone solve this problem? I restarted but not solve

paulovictorcg avatar Jun 06 '18 14:06 paulovictorcg

I am also getting similar error, Dockerfile:

FROM centos:7 MAINTAINER Rajasekaran.Radhakrishnan RUN rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm RUN yum update -y RUN yum install -y aspnetcore-runtime-2.1 libunwind libicu dotnet-sdk-2.1.103 WORKDIR /usr/src/app COPY taggingtool-backend/Tagging/bin/Release/netcoreapp2.0/publish /usr/src/app EXPOSE 5000/tcp ENTRYPOINT ["dotnet", "run", "--server.urls", "http://0.0.0.0:5000"]

I build this image and when i run this image i got below error: docker run -p 5000:5000 dotnetcore:2.1

Welcome to .NET Core!

Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.

Telemetry

The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include command-line arguments. The da ta is collected by Microsoft and shared with the community. You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell. You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.

Configuring...

A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once. Decompressing 0%...1%...2%...3%...4%...5%...6%...7%...8%...9%...10%...11%...12%...13%...14%...15%...16%...17%...18%...19%...20%...21%...22%...23%...2 4%...25%...26%...27%...28%...29%...30%...31%...32%...33%...34%...35%...36%...37%...38%...39%...40%...41%...42%...43%...44%...45%...46%...47%...48%... 49%...50%...51%...52%...53%...54%...55%...56%...57%...58%...59%...60%...61%...62%...63%...64%...65%...66%...67%...68%...69%...70%...71%...72%...73%.. .74%...75%...76%...77%...78%...79%...80%...81%...82%...83%...84%...85%...86%...87%...88%...89%...90%...91%...92%...93%...94%...95%...96%...97%...98%. ..99%...100% 8304 ms Expanding 0%...1%...2%...3%...4%...5%...6%...7%...8%...9%...10%...11%...12%...13%...14%...15%...16%...17%...18%...19%...20%...21%...22%...23%...24%.. .25%...26%...27%...28%...29%...30%...31%...32%...33%...34%...35%...36%...37%...38%...39%...40%...41%...42%...43%...44%...45%...46%...47%...48%...49%. ..50%...51%...52%...53%...54%...55%...56%...57%...58%...59%...60%...61%...62%...63%...64%...65%...66%...67%...68%...69%...70%...71%...72%...73%...74% ...75%...76%...77%...78%...79%...80%...81%...82%...83%...84%...85%...86%...87%...88%...89%...90%...91%...92%...93%...94%...95%...96%...97%...98%...99 %...100% 37033 ms Couldn't find a project to run. Ensure a project exists in /usr/src/app, or pass the path to the project using --project.

Can someone help me to fix this issue.

Regards, Raja

rrajadevops avatar Jun 11 '18 12:06 rrajadevops

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale comment. Stale issues will be closed after an additional 30d of inactivity.

Prevent issues from auto-closing with an /lifecycle frozen comment.

If this issue is safe to close now please do so.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle stale

docker-robott avatar Sep 09 '18 04:09 docker-robott

Closed issues are locked after 30 days of inactivity. This helps our team focus on active issues.

If you have found a problem that seems similar to this, please open a new issue.

Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. /lifecycle locked

docker-robott avatar Jun 02 '21 03:06 docker-robott