制作 centos jdk1.8 镜像

1.dockerfile

# using alpine-glibc instead of alpine  is mainly because JDK relies on glibc
FROM centos
# author
MAINTAINER wcy
# A streamlined jre
ADD java1.8.tar.gz /usr/java/jdk/
# set env
ENV JAVA_HOME /usr/java/jdk
ENV PATH ${PATH}:${JAVA_HOME}/bin
# run container with base path:/opt
WORKDIR /opt

2.构建

docker build -t jdk/java8:1.0 .

 

3. 标记标签

 docker tag jdk/java8:1.127.0.0.1/jdk/jdk1.8:1.0

4. 推送到仓库

docker push 127.0.0.1/jdk/jdk1.8:1.0


 

你可能感兴趣的:(制作 centos jdk1.8 镜像)