Public Repository

Last pushed: 2 years ago
Short Description
SSH, NGINX, PHP-FPM, SUPERVISORD
Full Description

Nginx, PHP-FPM, SSHD, SUPERVISORD

Additional repositories used: remi, rpmfusion-free/non-free

Important: SSHD is not configured !!!


FROM fedora
MAINTAINER Sergey Porfiriev "parf@difive.com"

RUN yum update -y
CMD mkdir /root/
ADD install.sh /root/install.sh
RUN sh /root/install.sh
ADD supervisord.ini /etc/supervisord.d/sshd-nginx-php.ini

SSH, NGINX, PHP-FPM, SUPERVISORD

EXPOSE 22 80 9001

CMD /usr/bin/supervisord -c /etc/supervisord.conf --nodaemon

#Install.sh

#!/bin/sh

echo installing packages

install packages

yum install -y http://rpms.famillecollet.com/remi-release-20.rpm
yum install -y http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-rawhide.noarch.rpm
yum install -y http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-rawhide.noarch.rpm

yum-config-manager

yum install -y yum-utils psmisc

side repos

yum-config-manager --enable remi
yum-config-manager --enable rpmfusion-free-updates
yum-config-manager --enable rpmfusion-nonfree-updates
yum -y update

system usability

NO GIT INSIDE - not to mess with core OS git

yum install -y GeoIP net-tools curl colordiff tmux unzip unrar pigz htop bash-completion vim-common vim-enhanced mc lbzip2 xz wget
yum install -y screen tmux htop fish bc

supervisord

yum install -y supervisor

yum install -y yum openssh openssh-server rsync git
/usr/bin/ssh-keygen -A

nginx

yum install -y nginx

PHP Core + must have libs

yum install -y php php-fpm php-mcrypt php-mbstring php-pecl-apcu php-opcache php-pecl-igbinary php-pecl-jsonc

extra libs

yum install -y php-pecl-xdebug php-xml php-pear php-gd

php connectivity

yum install -y php-mysqlnd php-pdo php-pecl-mongo php-pecl-memcached php-pecl-gearman php-pecl-redis

echo PHP tuning
perl -pi -e 's/(short_open_tag =) .+/\1 On/' /etc/php.ini
perl -pi -e 's/;(apc.enable_cli)=0/\1=1/' /etc/php.d/apcu.ini

allow sudo w/o term - always use public keys

perl -pi -e 's/Defaults requiretty/#Defaults requiretty/' /etc/sudoers
perl -pi -e 's/^%wheel\s+ALL=(ALL)\s+ALL$/#%wheel ALL=(ALL) ALL/' /etc/sudoers

wheel ~= root

perl -pi -e 's/# %wheel\s+ALL=(ALL)\s+NOPASSWD: ALL$/%wheel ALL=(ALL) NOPASSWD: ALL/' /etc/sudoers

Docker Pull Command
Owner
parf

Comments (0)