I'm unable to get cloudflared to run in phusion

25 views
Skip to first unread message

Ken Koch

unread,
Feb 7, 2020, 4:52:18 PM2/7/20
to passenger-docker
I'm at my wits end.
I currently run cloudflared doh proxy in  centos container but is bare-bones.
I wanted to get it into phusion so that it would be more robust, but I'm unable to get the thing to run.
I can always go into the running contianer and run it using the scripts I've created, but they will not auto start on container startup.
I've ready every bit of help i can find on this phusion image. 
Any help would be appreciated.

Below, i've pasted the docker file and the run script.

##########################
#DOCKER File
#########################
FROM phusion/baseimage
MAINTAINER xxxxxxxxx

RUN apt-get update

#install wget
RUN apt-get install wget

#get cloudflared

#install cloudflared
RUN apt install ./cloudflared-stable-linux-amd64.deb


RUN mkdir /etc/service/doh_proxy_test

RUN mkdir /home/doh_proxy_test

RUN echo '/usr/local/bin/cloudflared proxy-dns --port 53 --address 0.0.0.0 --upstream https://1.1.1.1/dns-query https://1.0.0.1/dns-query' >> /home/doh_proxy_test/start.sh

RUN chmod +x /home/doh_proxy_test/start.sh

RUN echo 'exec /home/doh_proxy_test/start.sh >>/var/log/cloudflared.log 2>&1' >> /etc/service/doh_proxy_test/run

RUN chmod +x /etc/service/doh_proxy_test/run

CMD ["/sbin/my_init"]

EXPOSE 53





##########################
#Run script
#########################
docker rm doh_proxy_test
docker run -d \
        --network my-macvlan-net \
    --ip=192.168.0.205 \
    -p 53:53/tcp -p 53:53/udp \
    --restart=unless-stopped \
        --name=doh_proxy_test \
        doh_proxy_test
Reply all
Reply to author
Forward
0 new messages