# base image ARG HARBOR FROM ${HARBOR}/csst/miniconda3-py312:latest # declare variables ARG PIPELINE_ID ARG BUILD ARG CREATED # set environment variables ENV PIPELINE_ID=${PIPELINE_ID} \ BUILD=${BUILD} \ CREATED=${CREATED} # label info LABEL MAINTAINER="Bo Zhang " LABEL PIPELINE_ID=${PIPELINE_ID} LABEL BUILD=${BUILD} LABEL CREATED=${CREATED} # run as root USER root # install system softwares RUN --mount=type=cache,id=apt,target=/var/cache/apt \ apt-get update && apt-get install -y \ git \ && rm -rf /var/lib/apt/lists/* # run as csst USER csst # copy VCS roots into image COPY --chown=csst:csst . /pipeline # install packages & requirements RUN --mount=type=cache,id=pip,uid=9000,gid=9000,target=/home/csst/.cache \ pip install pkg/ccds \ && pip install pkg/csst-dfs-client \ && pip install pkg/csst_common \ && pip install pkg/csst_dadel \ && pip install pkg/csst-dag \ && pip install -r pkg/csst-dag/requirements.txt \ && rm -rf pkg # change workdir WORKDIR /pipeline/output # 设置容器启动时默认执行的命令(这里以提供一个帮助信息为例) # 实际使用时,你可能会通过docker run覆盖这个命令来调用具体的工具 CMD ["python", "-c", "import csst_dag; print('csst_dag is available. Use docker run to execute specific functions.')"]