Docker - Getting error while trying to build image
I am new with docker, trying to create my first docker image/container with .net core console application in Windows 10, following the article https://www.c-sharpcorner.com/article/getting-started-with-docker-for-windows-containerize-a-c-sharp-console-app/
I am getting the error message when building image:
COPY /bin/Debug/netcoreapp2.0/publish/ . COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder989987487bin
The content of my Dockerfile:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY /bin/Debug/netcoreapp2.0/publish/ .
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
C:DotNetCoreConsoleApp1ConsoleApp1
is the root of my folder,
where I palced above Dockerfile.C:DotNetCoreConsoleApp1ConsoleApp1binDebugnetcoreapp2.1publish
is the folder where content is get published bydotnet publish
command.
Command used to create the image:
docker build -t alphaimage .
docker .net-core window console-application
add a comment |
I am new with docker, trying to create my first docker image/container with .net core console application in Windows 10, following the article https://www.c-sharpcorner.com/article/getting-started-with-docker-for-windows-containerize-a-c-sharp-console-app/
I am getting the error message when building image:
COPY /bin/Debug/netcoreapp2.0/publish/ . COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder989987487bin
The content of my Dockerfile:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY /bin/Debug/netcoreapp2.0/publish/ .
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
C:DotNetCoreConsoleApp1ConsoleApp1
is the root of my folder,
where I palced above Dockerfile.C:DotNetCoreConsoleApp1ConsoleApp1binDebugnetcoreapp2.1publish
is the folder where content is get published bydotnet publish
command.
Command used to create the image:
docker build -t alphaimage .
docker .net-core window console-application
add a comment |
I am new with docker, trying to create my first docker image/container with .net core console application in Windows 10, following the article https://www.c-sharpcorner.com/article/getting-started-with-docker-for-windows-containerize-a-c-sharp-console-app/
I am getting the error message when building image:
COPY /bin/Debug/netcoreapp2.0/publish/ . COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder989987487bin
The content of my Dockerfile:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY /bin/Debug/netcoreapp2.0/publish/ .
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
C:DotNetCoreConsoleApp1ConsoleApp1
is the root of my folder,
where I palced above Dockerfile.C:DotNetCoreConsoleApp1ConsoleApp1binDebugnetcoreapp2.1publish
is the folder where content is get published bydotnet publish
command.
Command used to create the image:
docker build -t alphaimage .
docker .net-core window console-application
I am new with docker, trying to create my first docker image/container with .net core console application in Windows 10, following the article https://www.c-sharpcorner.com/article/getting-started-with-docker-for-windows-containerize-a-c-sharp-console-app/
I am getting the error message when building image:
COPY /bin/Debug/netcoreapp2.0/publish/ . COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder989987487bin
The content of my Dockerfile:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY /bin/Debug/netcoreapp2.0/publish/ .
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
C:DotNetCoreConsoleApp1ConsoleApp1
is the root of my folder,
where I palced above Dockerfile.C:DotNetCoreConsoleApp1ConsoleApp1binDebugnetcoreapp2.1publish
is the folder where content is get published bydotnet publish
command.
Command used to create the image:
docker build -t alphaimage .
docker .net-core window console-application
docker .net-core window console-application
edited Nov 21 '18 at 13:43
M_Idrees
asked Nov 20 '18 at 8:40
M_IdreesM_Idrees
1,3871027
1,3871027
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
You can try this, by removing the first /
in the source directory of COPY
:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY bin/Debug/netcoreapp2.1/publish/ /app
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
Still getting same error COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder077812594binDebugnetcoreapp2.0publish: The system cannot find the path specified.
– M_Idrees
Nov 20 '18 at 10:42
I think docker is not able to find the folder
– t-prisar
Nov 20 '18 at 11:14
Yes, but how to make it find the right path
– M_Idrees
Nov 20 '18 at 11:14
you said thatnetcoreapp2.1
is the folder name afterdotnet publish
, but you are trying to copy fromnetcoreapp2.0
– t-prisar
Nov 20 '18 at 11:19
content is published to /bin/Debug/netcoreapp2.0/publish/ and COPY command is showing the same * bin/Debug/netcoreapp2.1/publish/*
– M_Idrees
Nov 20 '18 at 11:23
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53389110%2fdocker-getting-error-while-trying-to-build-image%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
You can try this, by removing the first /
in the source directory of COPY
:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY bin/Debug/netcoreapp2.1/publish/ /app
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
Still getting same error COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder077812594binDebugnetcoreapp2.0publish: The system cannot find the path specified.
– M_Idrees
Nov 20 '18 at 10:42
I think docker is not able to find the folder
– t-prisar
Nov 20 '18 at 11:14
Yes, but how to make it find the right path
– M_Idrees
Nov 20 '18 at 11:14
you said thatnetcoreapp2.1
is the folder name afterdotnet publish
, but you are trying to copy fromnetcoreapp2.0
– t-prisar
Nov 20 '18 at 11:19
content is published to /bin/Debug/netcoreapp2.0/publish/ and COPY command is showing the same * bin/Debug/netcoreapp2.1/publish/*
– M_Idrees
Nov 20 '18 at 11:23
|
show 2 more comments
You can try this, by removing the first /
in the source directory of COPY
:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY bin/Debug/netcoreapp2.1/publish/ /app
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
Still getting same error COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder077812594binDebugnetcoreapp2.0publish: The system cannot find the path specified.
– M_Idrees
Nov 20 '18 at 10:42
I think docker is not able to find the folder
– t-prisar
Nov 20 '18 at 11:14
Yes, but how to make it find the right path
– M_Idrees
Nov 20 '18 at 11:14
you said thatnetcoreapp2.1
is the folder name afterdotnet publish
, but you are trying to copy fromnetcoreapp2.0
– t-prisar
Nov 20 '18 at 11:19
content is published to /bin/Debug/netcoreapp2.0/publish/ and COPY command is showing the same * bin/Debug/netcoreapp2.1/publish/*
– M_Idrees
Nov 20 '18 at 11:23
|
show 2 more comments
You can try this, by removing the first /
in the source directory of COPY
:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY bin/Debug/netcoreapp2.1/publish/ /app
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
You can try this, by removing the first /
in the source directory of COPY
:
FROM microsoft/dotnet:2.0.4-runtime-nanoserver-1709 AS base
WORKDIR /app
COPY bin/Debug/netcoreapp2.1/publish/ /app
ENTRYPOINT ["dotnet", "ConsoleApp1.dll"]
edited Nov 20 '18 at 11:17
answered Nov 20 '18 at 10:25
t-prisart-prisar
7291619
7291619
Still getting same error COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder077812594binDebugnetcoreapp2.0publish: The system cannot find the path specified.
– M_Idrees
Nov 20 '18 at 10:42
I think docker is not able to find the folder
– t-prisar
Nov 20 '18 at 11:14
Yes, but how to make it find the right path
– M_Idrees
Nov 20 '18 at 11:14
you said thatnetcoreapp2.1
is the folder name afterdotnet publish
, but you are trying to copy fromnetcoreapp2.0
– t-prisar
Nov 20 '18 at 11:19
content is published to /bin/Debug/netcoreapp2.0/publish/ and COPY command is showing the same * bin/Debug/netcoreapp2.1/publish/*
– M_Idrees
Nov 20 '18 at 11:23
|
show 2 more comments
Still getting same error COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder077812594binDebugnetcoreapp2.0publish: The system cannot find the path specified.
– M_Idrees
Nov 20 '18 at 10:42
I think docker is not able to find the folder
– t-prisar
Nov 20 '18 at 11:14
Yes, but how to make it find the right path
– M_Idrees
Nov 20 '18 at 11:14
you said thatnetcoreapp2.1
is the folder name afterdotnet publish
, but you are trying to copy fromnetcoreapp2.0
– t-prisar
Nov 20 '18 at 11:19
content is published to /bin/Debug/netcoreapp2.0/publish/ and COPY command is showing the same * bin/Debug/netcoreapp2.1/publish/*
– M_Idrees
Nov 20 '18 at 11:23
Still getting same error COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder077812594binDebugnetcoreapp2.0publish: The system cannot find the path specified.
– M_Idrees
Nov 20 '18 at 10:42
Still getting same error COPY failed: CreateFile \?C:ProgramDataDockertmpdocker-builder077812594binDebugnetcoreapp2.0publish: The system cannot find the path specified.
– M_Idrees
Nov 20 '18 at 10:42
I think docker is not able to find the folder
– t-prisar
Nov 20 '18 at 11:14
I think docker is not able to find the folder
– t-prisar
Nov 20 '18 at 11:14
Yes, but how to make it find the right path
– M_Idrees
Nov 20 '18 at 11:14
Yes, but how to make it find the right path
– M_Idrees
Nov 20 '18 at 11:14
you said that
netcoreapp2.1
is the folder name after dotnet publish
, but you are trying to copy from netcoreapp2.0
– t-prisar
Nov 20 '18 at 11:19
you said that
netcoreapp2.1
is the folder name after dotnet publish
, but you are trying to copy from netcoreapp2.0
– t-prisar
Nov 20 '18 at 11:19
content is published to /bin/Debug/netcoreapp2.0/publish/ and COPY command is showing the same * bin/Debug/netcoreapp2.1/publish/*
– M_Idrees
Nov 20 '18 at 11:23
content is published to /bin/Debug/netcoreapp2.0/publish/ and COPY command is showing the same * bin/Debug/netcoreapp2.1/publish/*
– M_Idrees
Nov 20 '18 at 11:23
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53389110%2fdocker-getting-error-while-trying-to-build-image%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown