abiosoft / abiosoft/colima

Colima injects weird HTTP(S)_PROXY environment variable into containers

未關閉
#1,436 4 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Go
星號
30.8k
分支
613
PR 合併指標
30 天內沒有已合併 PR

描述

### Description

Every running container (except kubernetes ones) are injected with follow environment variables:
```
HTTPS_PROXY=http://localhost:7890
https_proxy=http://localhost:7890
http_proxy=http://localhost:7890
HTTP_PROXY=http://localhost:7890
```
Where my mac proxy setting is actually
```
http_proxy=http://127.0.0.1:7890
https_proxy=http://127.0.0.1:7890
```
And `colima ssh` vm proxy setting is
```
https_proxy=http://192.168.5.2:7890
HTTPS_PROXY=http://192.168.5.2:7890
HTTP_PROXY=http://192.168.5.2:7890
http_proxy=http://192.168.5.2:7890
```

This blocks all my running container to perform http request.

### Version

```
colima version 0.9.1
git commit: 0cbf719f5409ce04b9f0607b681c005d2ff7d94a

runtime: docker
arch: aarch64
client: v28.5.1
server: v28.5.1
limactl version 1.2.1
zsh: command not found: qemu-img
```

### Operating System

- [ ] macOS Intel <= 13 (Ventura)
- [ ] macOS Intel >= 14 (Sonoma)
- [ ] Apple Silicon <= 13 (Ventura)
- [x] Apple Silicon >= 14 (Sonoma)
- [ ] Linux

### Output of `colima status`

```
INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] docker socket: unix:///Users/qliu23/.colima/default/docker.sock
INFO[0000] containerd socket: unix:///Users/qliu23/.colima/default/containerd.sock
INFO[0000] kubernetes: enabled
```

### Reproduction Steps

1. With a proxy setting as `http_proxy=http://127.0.0.1:7890, https_proxy=http://127.0.0.1:7890` mac os, run `colima start`.
2. After everything is ready, start a container and check their environment variable, e.g. `docker run --rm -it --entrypoint /bin/sh grafana/grafana-oss`, and then run `env` in the container shell.
3. You'll found the env `http_proxy=http://localhost:7890` and other 3 ones.

### Expected behaviour

Expected no such environment variables in the container, or at least same as colima vm, using host ip instead of `localhost`.

### Additional context

N/A

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。