Docker构建因参考格式无效而失败

时间:2019-04-11 18:11:47

标签: maven docker build

执行docker build时遇到问题。这在我的Macbook上工作正常。可能会发生什么?

Dockerfile:

# Stage 1 (to create a "build" image, ~140MB)
FROM openjdk:8-jdk-alpine3.7 AS builder
RUN java -version

COPY . /usr/src/transformer/
WORKDIR /usr/src/transformer/
RUN apk --no-cache add maven && mvn --version
RUN mvn package

# Stage 2 (to create a downsized "container executable", ~87MB)
FROM openjdk:8-jre-alpine3.7
WORKDIR /root/
COPY --from=builder /usr/src/transformer/target/transformer-0.0.*.jar .

ENTRYPOINT ["java", "-jar", "./transformer-0.0.*.jar"] 

jenkins控制台上的错误:

Error parsing reference: "openjdk:8-jdk-alpine3.7 AS builder" is not a valid repository/tag: invalid reference format


[EnvInject] - Injecting environment variables from a build step.
[EnvInject] - Injecting as environment variables the properties file path 'properties'
[EnvInject] - Variables injected successfully.
[transformer_Pull_Request] $ /bin/sh -xe /tmp/jenkins4154938563612856789.sh
+ exit 1
Build step 'Execute shell' marked build as failure
# Jenkins Build
Build #2: **Still Failing**  (Docker Build Failed)
Image :
## Services
****

0 个答案:

没有答案