Skip to content

Instantly share code, notes, and snippets.

@relistan

relistan/Dockerfile

Created Dec 5, 2017
Embed
What would you like to do?
Sidecar Envoy Docker container
FROM envoyproxy/envoy:v1.5.0
RUN apt-get update
COPY envoy.yaml /etc/envoy.yaml
ADD run.sh /run.sh
CMD /run.sh
---
admin:
access_log_path: "/tmp/admin_access.log"
address: tcp://0.0.0.0:9901
lds:
refresh_delay_ms: 2000
cluster: sidecar-lds
listeners:
- address: tcp://0.0.0.0:10000
filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http
route_config:
virtual_hosts:
- name: local_service
domains: [ "*" ]
routes:
- timeout_ms: 0
prefix: "/"
cluster: sidecar-lds
filters:
- name: router
config: {}
cluster_manager:
clusters:
- name: lazyraster
connect_timeout_ms: 250
type: sds
lb_type: round_robin
service_name: lazyraster
- name: sidecar-lds
connect_timeout_ms: 250
type: static
lb_type: round_robin
hosts: [ {"url": "tcp://192.168.168.167:7777"} ]
sds:
refresh_delay_ms: 2000
cluster:
name: sidecar-sds
connect_timeout_ms: 250
type: static
lb_type: round_robin
hosts: [ {"url": "tcp://192.168.168.167:7777"} ]
cds:
refresh_delay_ms: 2000
cluster:
name: sidecar-cds
connect_timeout_ms: 250
type: static
lb_type: round_robin
hosts: [ {"url": "tcp://192.168.168.167:7777"} ]
#!/bin/sh
ip addr add 192.168.168.168/32 dev lo
exec /usr/local/bin/envoy -c /etc/envoy.yaml --service-node docker1 --service-cluster nitro-dev
@relistan

This comment has been minimized.

Copy link
Owner Author

@relistan relistan commented Dec 5, 2017

Building And Running

Build:

docker build -t envoy:1.5.0 .

Run:

docker run -i -t --net host --cap-add NET_ADMIN envoy:1.5.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment