Microsoft MVP성태의 닷넷 이야기
글쓴 사람
정성태 (seongtaejeong at gmail.com)
홈페이지
첨부 파일
 

ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

희한하군요, 분명히 파일이 있는데도,

$ cat Dockerfile
FROM ubuntu:24.04

$ docker build -f Dockerfile -t ubuntu24_dotnet_img .
[+] Building 2.0s (1/1) FINISHED                                                                                                                                 docker:default
 => [internal] load build definition from Dockerfile                                                                                                                       0.4s
 => => transferring dockerfile: 2B                                                                                                                                         0.0s
ERROR: failed to solve: failed to read dockerfile: open Dockerfile: no such file or directory

저렇게 Dockerfile을 열 수 없다고 오류가 발생합니다. 혹시나 권한이나 인자에 뭔가 오류가 있을까 싶어 조정해 봐도,

$ chmod 777 Dockerfile

// 또는 이렇게 실행해도,
$ docker build .

오류는 그대로였습니다. 이에 대해 검색해 보면,

Docker build can't find Dockerfile even when it's the only file in the folder
; https://stackoverflow.com/questions/78022884/docker-build-cant-find-dockerfile-even-when-its-the-only-file-in-the-folder

다행히 redirection을 이용한 우회 방법이 하나 나옵니다. ^^

$ docker build - < Dockerfile

진짜로 저렇게 하면 ^^; docker build가 잘됩니다.




위의 stackoverflow 답변에 보면 의미 있는 대답이 하나 있는데요,

I had to uninstall snap docker completely and install docker properly as described in the answer here

저도 해당 머신에 "snap install docker"로 설치한 유형이었습니다. 귀찮아서 저는 제거 및 다른 방법으로 설치하지는 않았지만, 예전에 닷넷도 snap으로 설치한 경우 이상하게 동작했던 경험에 비춰볼 때 아마도 snap과 관련되면서 뭔가 환경적인 요인에서 틀어지는 것이 아닌가 싶습니다.




[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]







[최초 등록일: ]
[최종 수정일: 8/18/2025]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... [151]  152  153  154  155  156  157  158  159  160  161  162  163  164  165  ...
NoWriterDateCnt.TitleFile(s)
1356정성태9/26/201232561Windows: 63. 윈도우 서버 2012 - Hyper-V의 새로운 기능 Live Migration [6]
1355정성태9/21/201230871Team Foundation Server: 49. TFS 2012 Express의 필수 보완 작업: 데이터베이스 백업 [1]
1354정성태9/19/201227653.NET Framework: 338. .NET CLR GC 시간 측정하는 방법파일 다운로드1
1353정성태9/17/201228577.NET Framework: 337. Python의 생성기와 코루틴을 C#으로 표현하면. [2]파일 다운로드1
1352정성태9/13/201226420.NET Framework: 336. .NET Profiler가 COM 개체일까?
1351정성태9/13/201231162디버깅 기술: 49. windbg - .NET Framework 스레드 개체의 COM Apartment 유형 확인하는 방법
1350정성태9/12/201231618개발 환경 구성: 167. (실은) 무료가 아니었던 AWS EC2 서비스 [4]
1349정성태9/11/201263709VS.NET IDE: 74. Visual Studio의 '새 파일'을 UTF-8 인코딩으로 지정하는 방법 [4]
1348정성태9/11/201231131오류 유형: 164. Active Directory - Functional Level 승격이 안 되는 문제
1347정성태9/10/201234036Windows: 62. 윈도우 서버 2012 - Hyper-V 서버 마이그레이션 [1]
1346정성태9/10/201234193Windows: 61. 윈도우 서버 2012 - Active Directory 서버 마이그레이션
1345정성태9/10/201238854스크립트: 12. 파이썬 - Win32 DLL 연동 [2]
1344정성태9/10/201231705오류 유형: 163. .NET Framework 4.5 제거 후 Visual Studio 2010 실행 시 Unknown Error
1343정성태9/8/201245441스크립트: 11. 파이썬(Python) 윈도우 개발 환경 [7]
1342정성태9/6/201229750VS.NET IDE: 73. Visual Studio 2012 - XmlCodeGenerator 마이그레이션
1341정성태9/4/201239143Windows: 60. Hyper-V에서 RemoteFX 없이 DirectX 11 제공 [12]
1340정성태9/4/201231360개발 환경 구성: 166. DOS - ping 결과에서 평균 응답 시간값 추출하기 [3]
1339정성태9/4/201233946개발 환경 구성: 165. 새로운 Visual Studio 2012 원격 디버깅 툴 [6]
1338정성태9/4/201235696.NET Framework: 335. C# - (핸들을 이용하여) 모든 열린 파일을 열람 [6]파일 다운로드1
1337정성태8/30/201225350Phone: 7. 디버거로 실습해 보는 윈도우 폰의 Tombstone 상태파일 다운로드1
1336정성태8/30/201242872.NET Framework: 334. 스레드 비정상 종료로 발생하는 CLOSE_WAIT 소켓 상태 [2]파일 다운로드1
1335정성태8/30/201232511Windows: 59. Hyper-V Internal 네트워크 VM의 인터넷 접속
1334정성태8/29/201251818.NET Framework: 333. 코드로 재현하는 소켓 상태(FIN_WAIT1, FIN_WAIT2, TIME_WAIT, CLOSE_WAIT, LAST_WAIT) [6]
1333정성태8/27/201255016개발 환경 구성: 164. system32 폴더에 있는 파일의 권한 조정 [2]
1332정성태8/23/201226558Team Foundation Server: 48. TFS - Team Project Collection 이전하는 방법
1331정성태8/23/201230090오류 유형: 162. Database '...' already exists. Choose a different database name. (Microsoft SQL Server, Error: 1801)
... [151]  152  153  154  155  156  157  158  159  160  161  162  163  164  165  ...