## BUILD_IMAGE_NAME 为 build stage 所编译出来包含 *.pyc 的 docker image
ARG ARG_JAVA_BUILD_IMAGE_NAME
ARG ARG_PYTHON_BUILD_IMAGE_NAME
FROM ${ARG_JAVA_BUILD_IMAGE_NAME} AS java-build
FROM ${ARG_PYTHON_BUILD_IMAGE_NAME} AS python-build
FROM openjdk:8u212-jdk-alpine3.9
USER root
#更新下载库
RUN echo "http://mirrors.aliyun.com/alpine/v3.9/main/" > /etc/apk/repositories
RUN echo "http://mirrors.aliyun.com/alpine/v3.9/community/" >> /etc/apk/repositories
#安装bash,支持命令行
RUN apk update \
&& apk upgrade \
&& apk add --no-cache bash\
bash-doc \
bash-completion \
&& rm -rf /var/cache/apk/* \
&& /bin/bash \
&& apk add -U tzdata curl
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
#安装uwsgi需要gcc环境
RUN apk add --no-cache gcc g++ make libc-dev linux-headers pcre-dev
RUN apk add --n
alpine 编译java和python的基础镜像Dockerfile
最新推荐文章于 2023-11-16 00:25:37 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)