I'm upgrading the php version to 7.0 in my docker image which is based on Ubuntu 14.04. I read some articles giving the commands to uninstall php5 while installing php7.0. Is this really necessary? What are the pros and cons?
7
-
3Is there something wrong with using the versions on hub.docker.com?Jonnix– Jonnix2016-11-15 14:13:11 +00:00Commented Nov 15, 2016 at 14:13
-
You can have both installed, just make sure that your files point to the right version, or that the correct version is in your PATH.aynber– aynber2016-11-15 14:14:33 +00:00Commented Nov 15, 2016 at 14:14
-
2Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault.Jay Blanchard– Jay Blanchard2016-11-15 14:16:00 +00:00Commented Nov 15, 2016 at 14:16
-
@jay I'm a developer not a devops. That's why I tend to use stackoverflow. However, if the question does not fit stackoverflow requirements I can delete it.unadivadantan– unadivadantan2016-11-15 16:16:27 +00:00Commented Nov 15, 2016 at 16:16
-
@JonStirling when I don't need to make a specific image I use the images available on dockerhub. However, sometimes, I need to install different softwares, activate modules and so on. In these situations, it's necessary to write your own image.unadivadantan– unadivadantan2016-11-15 16:19:01 +00:00Commented Nov 15, 2016 at 16:19
|
Show 2 more comments
1 Answer
add the new repository for PHP 7:
apt-get install software-properties-common
add-apt-repository ppa:ondrej/php
remove PHP 5 from your system and install PHP 7
apt-get update && apt-get purge php5-fpm && apt-get --purge autoremove && apt-get install php7.0-fpm php7.0-mysql php7.0-curl php7.0-gd php7.0-json php7.0-mcrypt php7.0-opcache php7.0-xml
see this article for more details