Sign inSign up

tmms/hostmanager

By tmms

•Updated 10 months ago

Custom hostmanager docker image

Image
0

6.4K

tmms/hostmanager repository overview

⁠Docker-Hostmanager

⁠Description

Updates your hosts file automatically (Mac / Linux: /etc/hosts - Windows: c:/Windows/System32/drivers/etc/hosts) for local development with docker. This hostmanager is running a cron job to minutely determines your hosts. The docker hostmanager is using the docker sock to scan container for an environment parameter VIRTUAL_HOST

### hostmanager-start
127.0.0.1 domain.xy domain.yz
### hostmanager-end

⁠Supported platforms/environments

  • Linux
  • MacOS
  • Windows

⁠Usage

⁠Windows
  hostmanager:
    image: "tmms/hostmanager:1.0"
    volumes:
      - //var/run/docker.sock:/var/run/docker.sock
      - /c/Windows/System32/drivers/etc/hosts:/hostmanager/hosts
⁠Mac/Linux
  hostmanager:
    image: "tmms/hostmanager:1.0"
    volumes:
      - //var/run/docker.sock:/var/run/docker.sock
      - /etc/hosts:/hostmanager/hosts
⁠Example client container
  web:
    image: "nginx:alpine"
    environment:
      VIRTUAL_HOST: "domain.xy"
    ports:
      - "80"

Tag summary

Content type

Image

Digest

Size

78 MB

Last updated

almost 5 years ago

docker pull tmms/hostmanager