ollama-server / Dockerfile
Yaya86's picture
Update Dockerfile
b64de7c verified
raw
history blame
540 Bytes
# Builder stage
FROM ubuntu:latest
RUN apt update && apt install curl -y
RUN curl -fsSL https://ollama.com/install.sh | sh
ENV OLLAMA_HOST=0.0.0.0
RUN useradd -m appuser && chown -R appuser:appuser /home/appuser
# Create the directory and give appropriate permissions
RUN mkdir -p /home/appuser/.ollama && chmod 777 /home/appuser/.ollama
USER appuser
COPY --chown=appuser ./Yaya86/ollama-server/id_ed25519.pub ./home/appuser/.ollama
WORKDIR /home/appuser/.ollama
CMD ["ollama", "serve"]
# Expose the server port
EXPOSE 11434