https://github.com/pottava/dockerized-aws-x-ray
The most light-weighted dockerized AWS X-Ray daemon with Alpine Linux.
https://github.com/pottava/dockerized-aws-x-ray
aws docker ecs golang x-ray
Last synced: over 1 year ago
JSON representation
The most light-weighted dockerized AWS X-Ray daemon with Alpine Linux.
- Host: GitHub
- URL: https://github.com/pottava/dockerized-aws-x-ray
- Owner: pottava
- Created: 2017-09-01T10:40:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-11-02T04:21:25.000Z (over 3 years ago)
- Last Synced: 2023-03-25T19:19:47.049Z (over 3 years ago)
- Topics: aws, docker, ecs, golang, x-ray
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/pottava/xray/
- Size: 99.6 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 59
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Dockerized AWS X-Ray Daemon
[](https://hub.docker.com/r/pottava/xray/)
Supported tags and respective `Dockerfile` links:
・latest ([versions/3.2/amd/Dockerfile](https://github.com/pottava/dockerized-aws-x-ray/blob/master/versions/3.2/amd/Dockerfile))
・3.2 ([versions/3.2/amd/Dockerfile](https://github.com/pottava/dockerized-aws-x-ray/blob/master/versions/3.2/amd/Dockerfile))
・3.2-arm ([versions/3.2/arm/Dockerfile](https://github.com/pottava/dockerized-aws-x-ray/blob/master/versions/3.2/arm/Dockerfile))
・2.1 ([versions/2.1/Dockerfile](https://github.com/pottava/dockerized-aws-x-ray/blob/master/versions/2.1/Dockerfile))
## Usage
```sh
$ docker run --rm pottava/xray:3.2 --version
AWS X-Ray daemon version: 3.2.0
$ docker run --rm pottava/xray:3.2 --help
Usage: X-Ray [options]
-a --resource-arn Amazon Resource Name (ARN) of the AWS resource running the daemon.
..
```
### Local
```sh
$ docker run --name xray -d \
-e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \
-p 2000:2000/udp -p 2000:2000/tcp \
pottava/xray:3.2 --region ${AWS_REGION} --local-mode
```
* with Docker-Compose:
```yaml
version: "2.4"
services:
app:
image:
ports:
- 80:80
environment:
- AWS_XRAY_DAEMON_ADDRESS=xray:2000
container_name: app
xray:
image: pottava/xray:3.2
command: --region ${AWS_REGION} --local-mode
environment:
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
container_name: xray
```
### ECS
* with AWS CloudFormation:
```yaml
TaskDef:
Type: AWS::ECS::TaskDefinition
Properties:
ContainerDefinitions:
- Name: app
Image:
PortMappings:
- ContainerPort: 80
HostPort: 0
Environment:
- Name: AWS_XRAY_DAEMON_ADDRESS
Value: xray:2000
Links:
- xray-daemon:xray
Cpu: 10
Memory: 100
MemoryReservation: 32
Essential: true
- Name: xray-daemon
Image: pottava/xray:3.2
Cpu: 10
Memory: 100
MemoryReservation: 32
Family: xxxx
TaskRoleArn: xxxx
```
* with AWS-CLI (JSON format for register-task-definition)
```json
[
{
"name": "app",
"image": "",
"portMappings": [
{
"protocol": "tcp",
"containerPort": 80,
"hostPort": 0
}
],
"environment": [
{"name": "AWS_XRAY_DAEMON_ADDRESS", "value": "xray:2000"}
],
"links": [
"xray-daemon:xray"
],
"cpu": 10,
"memory": 100,
"memoryReservation": 32,
"essential": true
},
{
"name": "xray-daemon",
"image": "pottava/xray:3.2",
"cpu": 10,
"memory": 100,
"memoryReservation": 32,
"essential": false
}
]
```