Dockerfile 743 B

12345678910111213141516171819202122232425
  1. FROM ubuntu:16.04
  2. MAINTAINER Zhuang Weiming <wingalong@gmail.com>
  3. RUN apt update
  4. RUN apt -y install software-properties-common
  5. RUN add-apt-repository ppa:deadsnakes/ppa
  6. RUN apt update
  7. RUN apt install -y python3.7
  8. RUN apt-get update
  9. RUN apt-get install -y wget python3-pip python3-dev libssl-dev libffi-dev bash
  10. RUN mkdir /app
  11. WORKDIR /app
  12. RUN wget https://github.com/jwilder/docker-gen/releases/download/0.3.3/docker-gen-linux-amd64-0.3.3.tar.gz
  13. RUN tar xvzf docker-gen-linux-amd64-0.3.3.tar.gz -C /usr/local/bin
  14. RUN pip3 install --upgrade pip setuptools wheel
  15. RUN pip3 install etcd3
  16. ADD . /app
  17. ENV DOCKER_HOST unix:///var/run/docker.sock
  18. CMD docker-gen -interval 10 -watch -notify "python3 /tmp/register.py" etcd.tmpl /tmp/register.py