|
| 1 | +# Apache SkyWalking Python Agent dockerfile and images |
| 2 | + |
| 3 | +**Docker images are not official ASF releases but provided for convenience. Recommended usage is always to build the |
| 4 | +source** |
| 5 | + |
| 6 | +**<img src="http://skywalking.apache.org/assets/logo.svg" alt="SkyWalking logo" height="90px" align="right" />** |
| 7 | + |
| 8 | +**SkyWalking**: an APM(application performance monitor) system, especially designed for microservices, cloud native and |
| 9 | +container-based (Docker, Kubernetes, Mesos) architectures. |
| 10 | + |
| 11 | +[](https://github.com/apache/skywalking) |
| 12 | +[](https://twitter.com/AsfSkyWalking) |
| 13 | + |
| 14 | +This image hosts the SkyWalking Python agent package on top of official Python base images providing support from |
| 15 | +Python 3.5 - 3.9. |
| 16 | + |
| 17 | +## How to use this image |
| 18 | + |
| 19 | +The images are hosted at [Docker Hub](https://hub.docker.com/r/apache/skywalking-python) and available from the `skywalking.docker.scarf.sh` endpoint. |
| 20 | + |
| 21 | +`skywalking.docker.scarf.sh/apache/skywalking-python` |
| 22 | + |
| 23 | +### Build your Python application image on top of this image |
| 24 | + |
| 25 | +Start by pulling the skywalking-python image as the base of your application image. |
| 26 | +Refer to [Docker Hub](https://hub.docker.com/r/apache/skywalking-python) for the list of tags available. |
| 27 | + |
| 28 | +```dockerfile |
| 29 | +FROM apache/skywalking-python:0.7.0-grpc-py3.9 |
| 30 | + |
| 31 | +# ... build your Python application |
| 32 | +``` |
| 33 | + |
| 34 | +You could start your Python application with `CMD`. For example - `CMD ['gunicorn', 'app.wsgi']` |
| 35 | + |
| 36 | +You don't need to care about enabling the SkyWalking Python agent manually, |
| 37 | +it should be adopted and bootstrapped automatically through the `sw-python` CLI. |
| 38 | + |
| 39 | +[Environment variables](../docs/EnvVars.md) can be provided to customize the agent behavior. |
| 40 | + |
| 41 | +### Build an image from the dockerfile |
| 42 | + |
| 43 | +Provide the following arguments to build your own image from the dockerfile. |
| 44 | + |
| 45 | +```text |
| 46 | +BASE_IMAGE # the Python base image to build upon |
| 47 | +SW_PYTHON_AGENT_VERSION # agent version to be pulled from PyPI |
| 48 | +SW_PYTHON_AGENT_PROTOCOL # agent protocol - grpc/ http/ kafka |
| 49 | +``` |
| 50 | + |
| 51 | +## License |
| 52 | + |
| 53 | +[Apache 2.0 License.](/LICENSE) |
0 commit comments