Docker:找不到指定的Dockerfile错误

时间:2017-01-06 01:03:39

标签: nginx docker docker-compose dockerfile

我想使用docker在我的PC(MacOS)上建立一个Web开发平台。在docker容器中安装nginx后,我想构建nginx。我收到了这个错误。

apply

我在互联网上搜索,但我无法解决我的问题。

容器信息(docker ps -a):

structure(c(1055289600, 1092182400, 1086220800, 1074556800, 1109289600, 
1041897600, 1069200000, 1047427200, 1072656000, 1048636800, 1092873600, 
1090195200, 1051574400, 1052179200, 1130371200, 1242777600, 1140652800, 
1137974400, 1045526400, 1111104000, 1073952000, 1052870400, 1087948800, 
1053993600, 1039564800, 1141603200, 1074038400, 1105315200, 1060560000, 
1072051200, 1046217600, 1107129600, 1088553600, 1071619200, 1115596800, 
1050364800, 1147046400, 1083628800, 1056412800, 1159747200, 1087257600, 
1201478400, 1120521600, 1066176000, 1034553600, 1057622400, 1078876800, 
1010880000, 1133913600, 1098230400, 1170806400, 1037318400, 1070409600, 
1091577600, 1057708800, 1182556800, 1091059200, 1058227200, 1061337600, 
1034121600, 1067644800, 1039478400, 1022198400, 1063065600, 1096329600, 
1049760000, 1081728000, 1016150400, 1029801600, 1059350400, 1087257600, 
1181692800, 1310947200, 1125446400, 1057104000, NA, 1085529600, 
1037664000, 1091577600, 1080518400, 1110758400, 1092787200, 1094601600, 
1169424000, 1232582400, 1058918400, 1021420800, 1133136000, 1030320000, 
1060732800, 1035244800, 1090800000, 1129161600, 1055808000, 1060646400, 
1028678400, 1075852800, 1144627200, 1111363200, 1070236800), class = c("POSIXct", 
"POSIXt"), tzone = "UTC")

这是我的docker-compose.yml文件:

Cannot locate specified Dockerfile:nginx.docker

我该如何解决这个问题?

1 个答案:

答案 0 :(得分:1)

我用Dockerfile的位置解决了它。 docker找不到dockerfile。这就是为什么,我得到了这个错误。顺便说一句,感谢@harald Nordgren。