mix / Dockerfile
wkplhc's picture
Update Dockerfile
2ed523a verified
raw
history blame contribute delete
640 Bytes
FROM ubuntu:22.04
# 设置环境变量
ENV OLLAMA_HOST=0.0.0.0:7860
ENV OLLAMA_ORIGINS=*
ENV HOME=/root
# 安装系统基础工具:加上了 zstd 这一关键依赖
RUN apt-get update && apt-get install -y \
curl \
ca-certificates \
zstd \
&& rm -rf /var/lib/apt/lists/*
# 安装 Ollama 官方脚本
RUN curl -fsSL https://ollama.com/install.sh | sh
# 创建并进入工作目录
WORKDIR /app
# 复制启动脚本
COPY entrypoint.sh .
# 赋予执行权限并预设配置目录
RUN chmod +x entrypoint.sh && \
mkdir -p /root/.ollama
# 暴露 7860 端口
EXPOSE 7860
# 启动容器
ENTRYPOINT ["./entrypoint.sh"]