1、创建Dockerfile
touch Dockerfile
2、编辑Dockerfile内容
FROM alpine:latest
RUN echo "https://mirrors.aliyun.com/alpine/v3.19/main/" > /etc/apk/repositories && \
echo "https://mirrors.aliyun.com/alpine/v3.19/community/" >> /etc/apk/repositories
RUN apk add --no-cache openjdk8
CMD ["java","-version"]
3、构建镜像
docker build --network host -t openjdk:8-jdk-alpine-arm .
4、推送镜像
docker push openjdk:8-jdk-alpine-arm