Compare commits

..

6 Commits

Author SHA1 Message Date
David Darias 73997fb041
Merge pull request #3 from jeffreyvdhondel/master
Updated the README.md
2018-10-08 11:46:38 -04:00
Jeffrey 26ccc5ae52 Merge branch 'develop' 2018-10-08 16:02:36 +02:00
Jeffrey 50cd480853 Update README.md 2018-10-08 16:01:49 +02:00
David Darias 388bc4a4d2 Merge branch 'develop' 2018-06-30 17:00:14 -04:00
David Darias f8d3f1858e Merge branch 'master' of github.com:dvddarias/docker-hoster 2015-11-18 21:25:46 -05:00
David Darias b0bb8b193c Update README.md 2015-11-02 23:06:13 -05:00
3 changed files with 4 additions and 7 deletions

View File

@ -1,4 +1,4 @@
FROM python:3-alpine
FROM frolvlad/alpine-python3
RUN pip3 install docker
RUN mkdir /hoster

View File

@ -19,12 +19,12 @@ Hoster provides by default the entries `<container name>, <hostname>, <container
For example, the following container would be available via DNS as `myname`, `myhostname`, `et54rfgt567` and `myserver.com`:
docker run -d \
docker run --restart=unless-stopped -d \
--name myname \
--hostname myhostname \
--network somenetwork --network-alias "myserver.com" \
mycontainer
If you need more features like **systemd interation** and **dns forwarding** please check [resolvable](https://hub.docker.com/r/mgood/resolvable/)
If you need more features like **systemd integration** and **dns forwarding** please check [resolvable](https://hub.docker.com/r/mgood/resolvable/)
Any contribution is, of course, welcome. :)

View File

@ -62,8 +62,6 @@ def get_container_data(dockerClient, container_id):
container_hostname = info["Config"]["Hostname"]
container_name = info["Name"].strip("/")
container_ip = info["NetworkSettings"]["IPAddress"]
if info["Config"]["Domainname"]:
container_hostname = container_hostname + "." + info["Config"]["Domainname"]
result = []
@ -106,7 +104,6 @@ def update_hosts_file():
break;
#remove all the trailing newlines on the line list
if lines:
while lines[-1].strip()=="": lines.pop()
#append all the domain lines