docker: fix volume permission errors

This commit is contained in:
Jeffrey Morgan 2023-09-30 12:32:06 -07:00
parent 1d0ebe67e8
commit 9abb66254a

View file

@ -15,13 +15,9 @@ RUN /usr/local/go/bin/go generate ./... \
&& /usr/local/go/bin/go build .
FROM ubuntu:22.04
ENV OLLAMA_HOST 0.0.0.0
RUN apt-get update && apt-get install -y ca-certificates
RUN groupadd ollama && useradd -m -g ollama ollama
COPY --from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
USER ollama:ollama
EXPOSE 11434
ENV OLLAMA_HOST 0.0.0.0
ENTRYPOINT ["/bin/ollama"]
CMD ["serve"]