[英]Downgrade to PHP 5.4.45 in Phusion Docker
I'm running a dev environment using Docker and https://github.com/phusion/baseimage-docker . 我正在使用Docker和https://github.com/phusion/baseimage-docker运行开发环境。
I've tried installing PHP 5.4.45 on it, but I always get a PHP 5.5.9 version when running apt-cache policy php5
. 我试过在上面安装PHP 5.4.45,但是在运行apt-cache policy php5
时,我总是得到PHP 5.5.9版本。
Every guide uses sudo add-apt-repository ppa:ondrej/php5-oldstable
, which I installed but it doesn't work..any ideas? 每个指南都使用sudo add-apt-repository ppa:ondrej/php5-oldstable
,我安装了它,但是它不起作用..任何想法吗?
This is one of the guides I tried: https://www.dev-metal.com/how-to-install-latest-php-5-4-x-on-ubuntu-12-04-lts-precise-pangolin/ 这是我尝试过的指南之一: https : //www.dev-metal.com/how-to-install-latest-php-5-4-x-on-ubuntu-12-04-lts-precise-pangolin /
So the phusion:baseimage:latest will (at the moment) use Ubuntu 16.04. 因此,phusion:baseimage:latest(目前)将使用Ubuntu 16.04。
The PHP 5.4 repository will only work with Ubuntu 12.04. PHP 5.4存储库仅适用于Ubuntu 12.04。
This is how I got it working: 这就是我的工作方式:
1: Start a container based on Phusion 0.9.9 (which is based on Ubuntu 12.04): 1:启动基于Phusion 0.9.9(基于Ubuntu 12.04的容器):
docker run phusion/baseimage:0.9.9
2: Lookup the name of the container and enter it 2:查找容器的名称并输入
3: run following commands: 3:运行以下命令:
apt-get update && apt-get install -y python-software-properties software-properties-common
export LC_ALL=en_US.UTF-8
add-apt-repository ppa:ondrej/php5-oldstable
apt-get update
apt-cache policy php5
4: output will be: 4:输出将是:
php5: Installed: (none) Candidate: 5.4.45-4+deprecated+dontuse+deb.sury.org~precise+1 Version table: 5.4.45-4+deprecated+dontuse+deb.sury.org~precise+1 0 500 http://ppa.launchpad.net/ondrej/php5-oldstable/ubuntu/ precise/main amd64 Packages 5.3.10-1ubuntu3.25 0 500 http://archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages 500 http://archive.ubuntu.com/ubuntu/ precise-security/main amd64 Packages 5.3.10-1ubuntu3 0 500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.