How can I start Nginx with php-fpm based on Ubuntu image using Dockerfile? -
i have dockerfile
few commands:
from ubuntu run apt-get install -y nginx php5 php5-fpm add . /code
when run docker build .
command next error:
e: package 'php5-fpm' has no installation candidate info[0006] command [/bin/sh -c apt-get install nginx php5 php5-fpm] returned non-zero code: 100
how can start nginx
php-fpm
based on ubuntu
image?
you can see more complete example here nginx
:
# install nginx. run \ add-apt-repository -y ppa:nginx/stable && \ apt-get update && \ apt-get install -y nginx && \ rm -rf /var/lib/apt/lists/* && \ echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \ chown -r www-data:www-data /var/lib/nginx
for php-fpm
, have this example:
run apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv-keys e5267a6c; \ echo 'deb http://ppa.launchpad.net/ondrej/php5/ubuntu trusty main' > /etc/apt/sources.list.d/ondrej-php5-trusty.list; \ apt-get update ; \ apt-get -y install php5-fpm php5-mysql php-apc php5-imagick php5-imap php5-mcrypt php5-curl php5-cli php5-gd php5-pgsql php5-sqlite php5-common php-pear curl php5-json php5-redis redis-server memcached php5-memcache ; \ apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
in both cases, note usage of:
add-apt-repository
in order add relevant repos packages installapt-get update
, in order downloads package lists repositories , "updates" them information on newest versions of packages , dependencies.
Comments
Post a Comment