gh640 / docker-proxy-samples

🐳 Samples to try Docker proxy feature

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

docker-proxy-samples

Samples to try Docker proxy feature.

Prerequiresites

  • Docker
  • Docker Compose

Usage

1. Build Docker images

docker compose build

2. Start proxy container

docker compose up proxy

3. Start client container and make requests

Open a new terminal and run the following command:

docker compose run --rm -it client python
>>> import requests as r
>>> r.get('https://example.com')
<Response [200]>

You can see the proxy is used.

About

🐳 Samples to try Docker proxy feature


Languages

Language:Dockerfile 100.0%