-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.phusion
executable file
·101 lines (81 loc) · 2.79 KB
/
Dockerfile.phusion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
###################### BETA #######################
## Concept is to build a PHP container to
## run a web service that shows status of service
###################################################
FROM phusion/baseimage
MAINTAINER Seth Carstens <[email protected]>
# ensure UTF-8
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8
ENV CF_API inserttoken
ENV CF_EMAIL insertemail
ENV CF_HOST insertdomain
# phusion setup
ENV HOME /root
RUN /etc/my_init.d/00_regen_ssh_host_keys.sh
#CMD ["/sbin/my_init"]
#
## nginx-php installation
RUN apt-get install -y language-pack-en-base
RUN LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
RUN apt-get update
#RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install php7.0
#RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install php7.0-fpm
#RUN DEBIAN_FRONTEND="noninteractive" apt-get -y install php7.0-mysql php7.0-mcrypt php7.0-curl
#
## install nginx (full)
#RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y nginx-full
# install latest version of nodejs
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y nodejs
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y npm
RUN ln -s /usr/bin/nodejs /usr/bin/node
# install php composer
#RUN curl -sS https://getcomposer.org/installer | php
#RUN mv composer.phar /usr/local/bin/composer
## add build script (also set timezone to Americas/Sao_Paulo)
#RUN mkdir -p /root/setup
#ADD build/setup.sh /root/setup/setup.sh
#RUN chmod +x /root/setup/setup.sh
#RUN (cd /root/setup/; /root/setup/setup.sh)
## copy files from repo
#ADD build/default /etc/nginx/sites-available/default
ADD build/.bashrc /root/.bashrc
# disable services start
#RUN update-rc.d -f apache2 remove
#RUN update-rc.d -f nginx remove
#RUN update-rc.d -f php7.0-fpm remove
## add startup scripts for nginx
#ADD build/nginx.sh /etc/service/nginx/run
#RUN chmod +x /etc/service/nginx/run
#
### add startup scripts for php7.0-fpm
#ADD build/phpfpm.sh /etc/service/phpfpm/run
#RUN chmod +x /etc/service/phpfpm/run
## set WWW public folder
#RUN mkdir -p /var/www/public
#ADD build/index.php /var/www/public/index.php
#
#RUN chown -R www-data:www-data /var/www
#RUN chmod 755 /var/www
# set terminal environment
ENV TERM=xterm
# port and settings
#EXPOSE 80
# Install CloudFlare CLI
RUN npm update -g
RUN npm install -g cloudflare-cli
RUN npm update -g
# Install DNS utilities for public IP lookup
RUN apt-get update
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y dnsutils
RUN mkdir /root/app
RUN chmod 777 /root/app
ADD app/build_cfcli_config.sh /root/app/build_cfcli_config.sh
RUN chmod 777 /root/app/build_cfcli_config.sh
RUN ls -lart /root/app/
#ENTRYPOINT ["/root/app/build_cfcli_config.sh"]
# cleanup apt and lists
RUN apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# ON RUN
#CMD ["build_cfcli_config.sh"]