alpine java8 docker 镜像制作

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 镜像制作)