FROM centos
LABEL pro="recommend"

RUN mkdir -p /go/config && \
    mkdir /go/log
ADD appd /go/bin/
ADD config.json /go/config/


RUN echo -e '#!/bin/sh \n\n\
/go/bin/appd --config=/go/config/config.json \
--log_dir=/go/log --alsologtostderr \
"$@"' > /usr/bin/rec_entrypoint.sh \
&& chmod +x /usr/bin/rec_entrypoint.sh

ENTRYPOINT ["/usr/bin/rec_entrypoint.sh"]
