Skip to content
wanghaisheng edited this page Sep 6, 2016 · 1 revision

Ticktick dockerfile

#[wanghs@db2 alpine-erlang]$ docker run  --rm --name ticktick -p 8099:8080 -it dc/erlang /bin/bash

#[wanghs@db2 ~]$ sudo iptables -t nat -nL

#Chain DOCKER (2 references)
#target     prot opt source               destination
#RETURN     all  --  0.0.0.0/0            0.0.0.0/0
#RETURN     all  --  0.0.0.0/0            0.0.0.0/0
#DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8787 to:172.17.0.2:8787
#DNAT       tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:8099 to:172.17.0.6:8080


#[wanghs@db2 ~]$  curl -G http://172.17.0.6:8080/id
#03502ef93c400000
#and command to explain an existing id:

#$ curl -G http://172.17.0.6:8080/explain?id=03502ef93c400000

#which you'll get the response:

#{"version":0,"seconds":55586553,"mseconds":241,"sequence":0,"machine":0,"tag":0}
#
#
FROM dc/alpine


RUN export DEPS="\
	git \
  curl \
  bash \
  make \
	erlang \
	erlang-webtool \
	erlang-xmerl \
	erlang-tools \
	erlang-typer \
	erlang-snmp \
	erlang-test-server \
	erlang-syntax-tools \
	erlang-ssl \
	erlang-sasl \
	erlang-runtime-tools \
	erlang-ssh \
	erlang-stdlib \
	erlang-ose \
	erlang-otp-mibs \
	erlang-reltool \
	erlang-mnesia \
	erlang-percept \
	erlang-parsetools \
	erlang-orber \
	erlang-public-key \
	erlang-odbc \
	erlang-os-mon \
	erlang-observer \
	erlang-et \
	erlang-ic \
	erlang-megaco \
	erlang-kernel \
	erlang-hipe \
	erlang-inets \
	erlang-jinterface \
	erlang-erts \
	erlang-gs \
	erlang-eunit \
	erlang-debugger \
	erlang-costime \
	erlang-costransaction \
	erlang-erl-interface \
	erlang-edoc \
	erlang-dialyzer \
	erlang-eldap \
	erlang-diameter \
	erlang-erl-docgen \
	erlang-crypto \
	erlang-cosevent \
	erlang-cosnotification \
	erlang-asn1 \
	erlang-cosfiletransfer \
	erlang-coseventdomain \
	erlang-dev \
	erlang-common-test \
	erlang-compiler \
	erlang-cosproperty\
 " &&\
 apk --update add $DEPS &&\
 rm -rf /var/cache/apk/* &&\
 git clone https://github.com/erlang/rebar3.git /rebar3 &&\
 cd /rebar3 &&\
  rm -rf ~/.cache/rebar3/hex &&\
 escript bootstrap &&\
 mv /rebar3/rebar3 /bin &&\
 cd / &&\
rm -rf /rebar3


RUN cd /tmp && \
    git clone  https://github.com/ericliang/ticktick.git && \
    cd ticktick && \
    make all && \
    ./start-dev.sh

CMD ["/bin/bash"]