summaryrefslogtreecommitdiff
path: root/hostsdns/Dockerfile
blob: 1ea0f6efeebb699516d683927d39aee36fa7c676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM python:2.7-alpine

RUN apk add --no-cache bash wget

RUN mkdir /app
RUN pip install docker
ADD event-watcher.py /app/event-watcher.py
RUN chmod 755 /app/event-watcher.py

WORKDIR /app
ENTRYPOINT ["/app/event-watcher.py" ]

# Create a container that automatically updates
# the /etc/hosts file on the hosting server when
# a new container is stopped or started.
#
# Requires start with following params:
#   -v /var/run/docker.sock:/var/run/docker.sock
#   -v /etc/hosts:/tmp/hosts
# The user executing the docker run command must
#  also have read/write perms on /etc/hosts
#
# Any container startd with a -e ALIAS arg will have that
#  alias associated with it's IP address.  Specify multiple
#  hostnames with comma separated list.