The container which acts as a base image for containers which require embedded embassy proxying. It assumes additional services are dropped in as supervisord.d/*.ini files, though obviously you can get creative and do something else.
The default entrypoint for the container is /bin/runner.sh unless changed, the runners performs the following;
Below is collection of environment variables passed to embassy
NAME="Embassy Service Proxy"
EMBASSY_VERBOSE=${EMBASSY_VERBOSE:-"-logtostderr=true -v=3"}
EMBASSY_DISCOVERY=${EMBASSY_DISCOVERY:-"consul://localhost:8500"}
EMBASSY_INERFACE=${EMBASSY_INERFACE:-eth0}
EMBASSY_PORT=${EMBASSY_PORT:-9999}
EMBASSY_PROXY=${EMBASSY_PROXY:-172.17.42.1}
EMBASSY_OPTIONS="${EMBASSY_VERBOSE} \
-interface=${EMBASSY_INERFACE} \
-port=${EMBASSY_PORT} \
-discovery=${EMBASSY_DISCOVERY} \
-provider=static \
-services=\"${BACKENDS}\""
Essentially the two which need to passed are the discovery and services
$ docker -d -P \
--cap-add NET_ADMIN \
-e EMBASSY_DISCOVERY=consul://IP:PORT \
-e BACKENDS='frontend_http;80,mysql;3306,redis;6563' \
...
# just drop into a sheel
$ docker run -ti --rm -e <ENV..> gambol99/embassy-service shell
# create a service from command line
$ docker run -ti --rm -e <ENV..> gambol99/embassy-service service httpd -D FOREGROUND
A very simple example
::Dockerfile
FROM gambol99/embassy-service
ADD httpd.ini /etc/supervisord.d/httpd.ini
ENV BACKENDS frontend_http;80,mysql;3306,redis;6563
RUN yum install -y httpd
EXPOSE 80
$ docker run -d -P --cap-add NET_ADMIN \
-e EMBASSY_DISCOVERY=consul://10.0.0.1:8500 <image>
...
Content type
Image
Digest
sha256:dc2f910f8…
Size
117.5 MB
Last updated
almost 11 years ago
docker pull gambol99/docker-embassy