FROM openjdk:8-alpine3.9
MAINTAINER zzs Docker spiringboot "hello@ll.com"
RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories &&
echo "http://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
RUN apk --update add curl bash tzdata &&
rm -rf /var/cache/apk/*
ENV TZ Asia/Shanghai
ARG JAR_FILE
COPY ${JAR_FILE} jenkinsdemo-0.0.1-SNAPSHOT.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","/jenkinsdemo-0.0.1-SNAPSHOT.jar"]
是配置国内阿里云镜像源的命令问题引起的,改为下面的命令可以解决
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
已经解决,谢谢大佬。
– 中仕 1年前