mirror of
https://github.com/stilleshan/dockerfiles.git
synced 2025-12-24 13:37:58 +08:00
Update README.md
This commit is contained in:
@@ -4,33 +4,40 @@ GitHub [stilleshan/dockerfiles](https://github.com/stilleshan/dockerfiles)
|
||||
Docker [stilleshan/tinyproxy](https://hub.docker.com/r/stilleshan/tinyproxy)
|
||||
> *docker image support for X86 and ARM*
|
||||
|
||||
## docker 启动
|
||||
## 简介
|
||||
基于 [tinyproxy/tinyproxy](https://github.com/tinyproxy/tinyproxy) 项目的 docker 镜像.
|
||||
|
||||
## 更新
|
||||
**2021-06-09** 更新`1.10.0`版 docker 镜像,新增同时支持 X86 和 ARM 架构.
|
||||
|
||||
## 部署
|
||||
### docker
|
||||
```shell
|
||||
docker run -d --name tinyproxy --restart always -p 8888:8888 stilleshan/tinyproxy
|
||||
docker run -d --name=tinyproxy --restart=always -p 8888:8888 stilleshan/tinyproxy
|
||||
```
|
||||
|
||||
## docker compose 启动
|
||||
### docker compose
|
||||
下载 [docker-compose.yml](https://raw.githubusercontent.com/stilleshan/dockerfiles/main/tinyproxy/docker-compose.yml) 执行以下命令启动:
|
||||
```shell
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
## 使用示例
|
||||
## 使用
|
||||
```shell
|
||||
curl -x https://IP:8888 https://ifconfig.co
|
||||
```
|
||||
|
||||
## BasicAuth
|
||||
### BasicAuth
|
||||
Tinyproxy 支持 BasicAuth 身份验证,需启动一次容器并执行以下命令将`tinyproxy.conf`拷贝至宿主机,并删除该容器.
|
||||
```shell
|
||||
docker cp tinyproxy:/etc/tinyproxy/tinyproxy.conf .
|
||||
```
|
||||
配置`BasicAuth user password`参数并将`tinyproxy.conf`挂载至`/etc/tinyproxy/tinyproxy.conf`后再次启动容器.
|
||||
```shell
|
||||
docker run -d --name tinyproxy --restart always -p 8888:8888 -v /path/tinyproxy.conf:/etc/tinyproxy/tinyproxy.conf stilleshan/tinyproxy
|
||||
docker run -d --name=tinyproxy --restart=always -p 8888:8888 -v /path/tinyproxy.conf:/etc/tinyproxy/tinyproxy.conf stilleshan/tinyproxy
|
||||
```
|
||||
|
||||
### 使用示例
|
||||
### BasicAuth 示例
|
||||
```shell
|
||||
curl -x https://user:password@IP:8888 https://ifconfig.co
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user