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 . && /usr/local/go/bin/go build .
FROM ubuntu:22.04 FROM ubuntu:22.04
ENV OLLAMA_HOST 0.0.0.0
RUN apt-get update && apt-get install -y ca-certificates 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 COPY --from=0 /go/src/github.com/jmorganca/ollama/ollama /bin/ollama
EXPOSE 11434
USER ollama:ollama ENV OLLAMA_HOST 0.0.0.0
ENTRYPOINT ["/bin/ollama"] ENTRYPOINT ["/bin/ollama"]
CMD ["serve"] CMD ["serve"]