fission的基础环境包括两种:env 以及 builder。如果仅基于code构建function(i.e., 只创建deployachive),仅构建env即可;但如果需要构建sourcearchive,则需要同时创建env和builder。其中,builder基于fission-python-builder,而env基于fission-python-env。
FROM fission/python-env-3.9 #注意这里
RUN apk --no-cache add \
zlib-dev \
libjpeg-turbo-dev \
build-base
RUN pip install --upgrade pip #必须要添加,否则会出错
RUN pip install Pillow
EXPOSE 8001
FROM fission/python-builder-3.9 #注意这类
RUN apk --no-cache add \
zlib-dev \
libjpeg-turbo-dev \
build-base
RUN pip install --upgrade pip
RUN pip install Pillow
EXPOSE 8001
podman build -t $image_name:$image_tag -f $dockerfile_path
1. 登录docker hub (保证在root用户下)
podman login
2. 查看image ID
podman image list
3. 上传镜像
podman push $imageid $docker_hub_name/image_name:image_tag