FROM openjdk:8-jdk-alpine RUN apk --update add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && apk del tzdata && rm -rf /var/cache/apk/*制作镜像
docker build -t jdk8-alpine-mine .设置版本
docker tag jdk8-alpine-mine:latest jdk8-alpine-mine:v1将镜像上传到私有仓库
# 重命名,加上域名端口 docker tag jdk8-alpine-mine:v1 10.3.108.62:8083/jdk8-alpine-mine:v1 # 登录 docker login 10.3.108.62:8083 # 上传 docker push 10.3.108.62:8083/jdk8-alpine-mine:v1遇到问题
Get “https://10.3.108.62:8083/v2/”: http: server gave HTTP response to HTTPS client
在deamon.json里添加相关配置
{ "insecure-registries":["10.3.108.62:8083"], }
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)