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

비밀번호

댓글 작성자
 




... 166  167  168  169  170  171  172  173  174  175  [176]  177  178  179  180  ...
NoWriterDateCnt.TitleFile(s)
683정성태3/28/200934321디버깅 기술: 26. 보호 모드로 응용 프로그램 디버깅하는 방법 - 두 번째 이야기 [3]
682정성태3/27/200931189디버깅 기술: 25. 보호 모드로 응용 프로그램 디버깅하는 방법 [2]
681정성태3/23/200928300오류 유형: 73. SQL Server 2008 Express 설치 오류
680정성태3/21/200928189.NET Framework: 125. WPF - RadioButton에 대한 데이터바인딩(2) [1]파일 다운로드1
679정성태3/15/200922781오류 유형: 72. IE 8 멈춤 현상 - 두 번째 이야기
678정성태3/15/200928389개발 환경 구성: 37. Hyper-V에서 Vista의 Virtual Machine Bus 장치 인식 문제
677정성태3/15/200928716개발 환경 구성: 36. MSI P45 Neo3-FR V2 - RAID 1 구성
997정성태2/26/201124247    답변글 개발 환경 구성: 36.1. 개발 환경 구성: 34 - 1. RAID 1 구성 이후...
676정성태3/15/200925364오류 유형: 71. IE 8 RC1 - 멈춤 현상
675정성태3/14/200928159오류 유형: 70. Virtual Machine Additions 제거
673정성태3/11/200926531웹: 10. 금일 진행되었던 마이크로소프트 IE 8 행사의 ActiveX 세션 PPT [6]파일 다운로드1
672정성태3/1/200940021Windows: 43. Loopback network adapter 설치하기 [2]
670정성태2/22/200933494.NET Framework: 124. IIS 7에서 SVC 호스팅 [1]
669정성태2/21/200927421오류 유형: 69. The SQL Server Network Interface library could not register the Service Principal Name (SPN) for the SQL Server service.
668정성태2/21/200932920개발 환경 구성: 35. SQL Express 버전과 User Instance 옵션
667정성태2/14/200944549웹: 9. IE 7. IWebBrowser2 인터페이스 메서드의 Navigate / Navigate2 차이점 [3]파일 다운로드1
666정성태2/12/200931233웹: 8. IE 8: 프로세스와 윈도우의 관계 - LCIE [1]파일 다운로드1
665정성태2/7/200927656웹: 7. Internet Explorer 8 - XHR, XDR, XST, XSRF [1]
664정성태2/5/200923632Windows: 42. Concurrency Runtime
663정성태2/5/200928162.NET Framework: 123. WPF - Arial Narrow 폰트 문제
662정성태2/3/200923598VS.NET IDE: 59. HyperAddin 도구 사용 설명 [1]
661정성태2/3/200927287오류 유형: 68. msxml6r.dll 설치 오류
660정성태2/3/200926206Windows: 41. UAC 보안 취약 [2]
659정성태2/2/200937320오류 유형: 67. ClickOnce 응용 프로그램이 실행되지 않을 때.
658정성태2/1/200929604Team Foundation Server: 30. 소스 서버 보안
657정성태2/1/200932645Windows: 40. Q1 Ultra + Windows 7 베타
... 166  167  168  169  170  171  172  173  174  175  [176]  177  178  179  180  ...