# Use the latest version of the ollama image FROM ollama/ollama:latest # ==> FIX: Install curl, which is required by the entrypoint script RUN apt-get update && \ apt-get install -y curl && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* # Set environment variables for the container. # OLLAMA_ROOT is set here for clarity and reinforced in the entrypoint for reliability. ENV OLLAMA_HOST=0.0.0.0 \ OLLAMA_ORIGINS='*'\ OLLAMA_ROOT=/tmp/ollama # Set a working directory WORKDIR /app # Copy the entrypoint script into the container COPY entrypoint.sh . # Make the entrypoint script executable RUN chmod +x ./entrypoint.sh # Expose the port for the Ollama server EXPOSE 11434 # Set the entrypoint to our custom script ENTRYPOINT ["./entrypoint.sh"]