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

비밀번호

댓글 작성자
 




... 136  137  138  139  140  141  142  143  144  145  146  147  148  [149]  150  ...
NoWriterDateCnt.TitleFile(s)
1406정성태1/22/201326201개발 환경 구성: 180. Windows Server 2012 RC 버전을 RTM으로 업그레이드하는 방법
1405정성태1/16/201347862.NET Framework: 358. C# - 닷넷 응용 프로그램에서 MySQL(MySqlConnector) 사용 [7]파일 다운로드1
1404정성태1/15/201332305개발 환경 구성: 179. Hyper-V VM 복사는 robocopy로. [2]
1403정성태1/14/201334320.NET Framework: 357. .NET 4.5의 2GB 힙 한계 극복
1402정성태1/14/201335923오류 유형: 166. SmtpClient.Send 오류 - net_io_connectionclosed
1401정성태1/11/201333522.NET Framework: 356. (공개키를 담은) 자바의 key 파일을 닷넷의 RSACryptoServiceProvider에서 사용하는 방법 [2]파일 다운로드1
1400정성태1/10/201332604Windows: 69. 작업표시줄의 터치 키보드(Touch Keyboard) 없애는 방법 [3]
1399정성태1/9/201328125.NET Framework: 355. 닷넷 환경이 왜 C/C++보다 느릴까요? [8]
1398정성태1/8/201327981오류 유형: 165. 새로 설치한 Visual Studio 2010의 Team Explorer 실행시 비정상 종료가 된다면?
1397정성태1/3/201331972Windows: 68. 윈도우 설치 ISO 이미지를 USB 하드에 적용하는 방법 [2]
1396정성태12/27/201233360사물인터넷: 2. 넷두이노 - 4.2.0 펌웨어 업데이트 방법 [1]파일 다운로드1
1395정성태12/26/201223634.NET Framework: 354. x64 - AspCompat과 STA COM 개체가 성능에 미치는 영향
1394정성태12/25/201224684.NET Framework: 353. x86 - AspCompat과 STA COM 개체가 성능에 미치는 영향
1393정성태12/25/201226125.NET Framework: 352. x64에서 필수로 지정하도록 바뀐 STAThread 특성 [2]
1392정성태12/21/201236049사물인터넷: 1. .NET Micro Framework - 넷두이노 플러스 [7]
1391정성태12/21/201228507.NET Framework: 351. JavaScriptSerializer, DataContractJsonSerializer, Json.NET [3]파일 다운로드1
1390정성태12/20/201227118.NET Framework: 350. String 데이터를 Stream으로 변환하는 방법 [2]
1389정성태12/12/201224778.NET Framework: 349. .NET Thread 인스턴스로부터 COM Apartment 유형 확인하는 방법파일 다운로드1
1388정성태12/12/201225996.NET Framework: 348. .NET x64 응용 프로그램에서 Teb 주소를 구하는 방법파일 다운로드1
1387정성태12/12/201231422VC++: 64. x64 Visual C++에서 TEB 주소 구하는 방법
1386정성태12/12/201232230디버깅 기술: 53. windbg - 덤프 파일로부터 네이티브 DLL을 추출하는 방법 [1]
1385정성태12/12/201228240디버깅 기술: 52. Windbg - The version of SOS does not match the version of CLR you are debugging.
1384정성태12/12/201232554개발 환경 구성: 178. System32 폴더의 64비트 DLL을 32비트 Depends.exe에서 보는 방법
1383정성태12/10/201228817개발 환경 구성: 177. 기업용 메신저를 위한 Office Communicator Server 2007 설치 [1]
1382정성태12/8/201231186개발 환경 구성: 176. WebPagetest 서버 - 설치 및 테스트
1381정성태12/5/201230187.NET Framework: 347. C# - 프로세스(EXE) 수준의 Singleton 개체 생성 [2]파일 다운로드1
... 136  137  138  139  140  141  142  143  144  145  146  147  148  [149]  150  ...