Created
May 16, 2017 07:52
-
-
Save JaniKibichi/45f0dc2188ac3e5be413f15cb405f376 to your computer and use it in GitHub Desktop.
Dockerfile for PlaySMS and AT Gateway
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Pull ubuntu docker image | |
FROM ubuntu:14.04 | |
MAINTAINER [email protected] | |
#Run Update | |
RUN apt-get -y update && apt-get -y update | |
#Install LAMP | |
RUN apt-get -y install apache2 | |
#Mariadb | |
RUN apt-get update \ | |
&&apt-get -y remove --purge mysql* \ | |
&&apt-get autoremove \ | |
&&apt-get autoclean \ | |
&&DEBIAN_FRONTEND=noninteractive apt-get install -y mariadb-server \ | |
&&mysql_install_db | |
#PHP | |
RUN apt-get -y install php5 libapache2-mod-php5 php5-mcrypt | |
#Install wget and GIT | |
RUN apt-get -y install wget && apt-get -y install git \ | |
&&wget https://sourceforge.net/projects/playsms/files/playsms/Version%201.4/playsms-1.4.tar.gz/download \ | |
&&tar -xvf download -C /usr/local/src \ | |
&&ls -l /usr/local/src/ | |
#Install sed | |
RUN apt-get update \ | |
&& apt-get -y install sed | |
RUN /usr/local/src/playsms-1.4/getcomposer.sh | |
#Make relevant copies | |
RUN mkdir -p /var/www/html/playsms /var/log/playsms /var/lib/playsms | |
RUN chown -R www-data /var/www/html/playsms /var/log/playsms /var/lib/playsms | |
RUN cp -R /usr/local/src/playsms-1.4/web/* /var/www/html/playsms | |
RUN cp /usr/local/src/playsms-1.4/web/config-dist.php /var/www/html/playsms/config.php | |
RUN sed -i -e 's/#DBHOST#/127.0.0.1/g' /var/www/html/playsms/config.php | |
RUN sed -i -e 's/#DBPORT#/3306/g' /var/www/html/playsms/config.php | |
RUN sed -i -e 's/#DBUSER#/root/g' /var/www/html/playsms/config.php | |
RUN sed -i -e 's/#DBPASS#/password/g' /var/www/html/playsms/config.php | |
RUN sed -i -e 's/#DBNAME#/playsms/g' /var/www/html/playsms/config.php | |
#SET up AT Gateways | |
RUN git clone https://github.com/JaniKibichi/plugin-africastalking.git \ | |
&& cd plugin-africastalking \ | |
&& cp -rR web/plugin/gateway/africastalking /var/www/html/playsms/plugin/gateway/ | |
CMD /usr/local/bin/playsmsd start \ | |
&& /usr/local/bin/playsmsd check |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment