FROM ollama/ollama:latest # Copy your Modelfile into the container COPY Modelfile . # Use a custom entrypoint to start the server and then create the model COPY entrypoint.sh /usr/local/bin/entrypoint.sh RUN chmod +x /usr/local/bin/entrypoint.sh # Expose the default Ollama port EXPOSE 11434 ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] CMD ["serve"]