[PR #4023] [CLOSED] fix(cli): unable to use CLI within the container #73651

Closed
opened 2026-05-05 05:34:40 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/4023
Author: @BlackHole1
Created: 4/29/2024
Status: Closed

Base: mainHead: fix-client-request-failed


📝 Commits (1)

  • 9f7f6df fix(cli): unable to use CLI within the container

📊 Changes

2 files changed (+28 additions, -17 deletions)

View changed files

📝 api/client.go (+9 -0)
📝 api/client_test.go (+19 -17)

📄 Description

In the container, OLLAMA_HOST is set by default to 0.0.0.0 (ref: Dockerfile#L137), which is fine when starting the server. However, as a client, it is must to use 127.0.0.1 or localhost for requests.

fix: #3521 #1337
maybe fix: #3526


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/4023 **Author:** [@BlackHole1](https://github.com/BlackHole1) **Created:** 4/29/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-client-request-failed` --- ### 📝 Commits (1) - [`9f7f6df`](https://github.com/ollama/ollama/commit/9f7f6df8dde9edf767d9c297ce9af143d983cf4d) fix(cli): unable to use CLI within the container ### 📊 Changes **2 files changed** (+28 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `api/client.go` (+9 -0) 📝 `api/client_test.go` (+19 -17) </details> ### 📄 Description In the container, `OLLAMA_HOST` is set by default to `0.0.0.0` (ref: [Dockerfile#L137]), which is fine when starting the server. However, as a client, it is must to use `127.0.0.1` or `localhost` for requests. fix: #3521 #1337 maybe fix: #3526 [Dockerfile#L137]: https://github.com/ollama/ollama/blob/7e432cdfac51583459e7bfa8fdd485c74a6597e7/Dockerfile#L137 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 05:34:40 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#73651