docker repository和tag出现<none>

时间:2017-07-04 14:32:37

标签: java dockerfile docker-build docker-windows

我正试图从github构建docker镜像。我正在运行以下命令来构建映像。

docker build -t test1:latest https://github.com/syndy1989/Accessibility.git

我收到以下错误:

PS C:\Users\Administrator> docker build -t test1:latest https://github.com/syndy1989/Accessibility.git
Sending build context to Docker daemon 78.03 MB
Step 1/13 : FROM 474614/my_repo1:windows_java_git
 ---> 2732d0c2549b
Step 2/13 : RUN git clone https://github.com/syndy1989/Accessibility.git
 ---> Using cache
 ---> 57ad907abaf6
Step 3/13 : RUN mkdir C:\\axe_accessibility
 ---> Using cache
 ---> 5b1f12fd22a3
Step 4/13 : WORKDIR C:\\axe_accessibility
 ---> Using cache
 ---> 196d2ceb8f72
Step 5/13 : COPY Sample.java C:\\axe_accessibility\\Sample.java
 ---> Using cache
 ---> 71ebbef33f51
Step 6/13 : COPY axe.min.js C:\\axe_accessibility\\axe.min.js
 ---> Using cache
 ---> c1804bd1708c
Step 7/13 : COPY phantomjs.exe C:\\axe_accessibility\\phantomjs.exe
 ---> Using cache
 ---> 0bd0796ee072
Step 8/13 : COPY datafile.properties C:\\axe_accessibility\\datafile.properties
 ---> Using cache
 ---> 68565416a292
Step 9/13 : COPY ./lib C:\\axe_accessibility\\lib
 ---> Using cache
 ---> 348c0cbcf842
Step 10/13 : WORKDIR C:\\axe_accessibility
 ---> 3678f4222d27
Removing intermediate container c33f1296c6a9
Step 11/13 : RUN javac -cp "./lib/*;" Sample.java
 ---> Running in 7216fd466a66
javac: no source files
Usage: javac <options> <source files>
use -help for a list of possible options
Sample.java : The term 'Sample.java' is not recognized as the name of a
cmdlet, function, script file, or operable program. Check the spelling of the
name, or if a path was included, verify that the path is correct and try again.
At line:1 char:95
+ ... ogressPreference = 'SilentlyContinue'; javac -cp ./lib/*; Sample.java
+                                                               ~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Sample.java:String) [], ParentC
   ontainsErrorRecordException
    + FullyQualifiedErrorId : CommandNotFoundException

The command 'powershell -Command $ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue'; javac -cp ".
/lib/*;" Sample.java' returned a non-zero code: 1

当我在Docker容器内部检查时,sample.java被复制到文件夹C:/ axe_accessibility中。我能够在容器内编译,但在构建图像时它不能正常工作。对此有任何建议会有所帮助。提前谢谢。

0 个答案:

没有答案