DockerHub Autobuild失败,但在本地成功

问题描述 投票:0回答:1

Docker构建在我的本地成功,但是在链接到我的Github帐户的Docker集线器上自动构建失败。您能建议我要去哪里吗?

Dockerfile

FROM openjdk:8-jdk-alpine
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

我在DockerHub上的构建配置

enter image description here

这里是构建错误

Step 5/6 : COPY ${JAR_FILE} app.jar
COPY failed: no source files were specified
docker dockerhub auto-build
1个回答
0
投票

我们需要在这里进行多阶段构建。在下面引用我的DockerFile

© www.soinside.com 2019 - 2024. All rights reserved.