alpine java8 docker 镜像制作
作者:
momo1023 | 来源:发表于
2020-03-10 14:42 被阅读0次
dockerfile
FROM alpine
ENV LANG='zh_CN.UTF-8'
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk update \
&& apk --no-cache add openjdk8 curl busybox tzdata \
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo Asia/Shanghai > /etc/timezone \
&& apk del tzdata \
&& rm -rf /tmp/* /var/cache/apk/*
build
$ docker build -t java8:alpine -f java.dockerfile .
result
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
java8 alpine 4d98855c53a9 2 hours ago 107MB
本文标题:alpine java8 docker 镜像制作
本文链接:https://www.haomeiwen.com/subject/pimwdhtx.html
网友评论