Last active
September 20, 2017 19:36
-
-
Save igoralves1/21205f4442b7ba59acc28e9a5cd24247 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://askubuntu.com/questions/756181/installing-php-5-6-on-xenial-16-04?rq=1 | |
https://hub.docker.com/r/yarsoniy/php5.6/~/dockerfile/ | |
https://github.com/oerdnj/deb.sury.org/issues/56 | |
FROM ubuntu:16.04 | |
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | |
ENV DEBIAN_FRONTEND noninteractive | |
#https://github.com/tianon/docker-brew-ubuntu-core/issues/48 | |
#ubuntu:latest (16.04) image does not contain 'sudo', breaking old Dockerfile builds | |
#Indeed -- you should be able to get sudo back by adding something simple like: | |
RUN apt-get update && apt-get install -y sudo && rm -rf /var/lib/apt/lists/* | |
W: http://archive.ubuntu.com/ubuntu/pool/main/d/dbus/dbus_1.10.6-1ubuntu3.3_amd64.deb: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf) | |
https://askubuntu.com/questions/786334/proxy-problems-after-upgrade-to-ubuntu-16-04-apt-1-2 | |
#Insatll add-apt-repository, that must be used to install ppa:ondrej/php in order to instal php5 | |
#add-apt-repository: command not found in Docker installation on Ubuntu 14.04 | |
#apt-get install -y python-software-properties | |
apt-get install -y software-properties-common python-software-properties | |
############################################################################################################################## | |
Installing php5.6 in Ubuntu 16.04 => https://askubuntu.com/questions/756181/installing-php-5-6-on-xenial-16-04?rq=1 | |
Note: | |
If you get add-apt-repository: command not found run the following command first : | |
$ sudo apt-get install software-properties-common | |
#Updating library | |
$ sudo add-apt-repository ppa:ondrej/php //No errors | |
$ sudo apt-get update | |
#After that step php5.6 is already available at '$ apt list' | |
$ sudo apt-get install php5.6 | |
FROM ubuntu:16.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
#RUN apt-get update | |
#https://github.com/phusion/baseimage-docker/issues/319 | |
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils | |
#https://community.online.net/t/docker-build-fails-on-missing-add-apt-repository/394 | |
RUN apt-get -y install software-properties-common | |
#RUN apt-get upgrade | |
RUN apt-get install -y vim | |
RUN apt-get install -y apache2 | |
RUN add-apt-repository ppa:ondrej/php | |
RUN apt-get update | |
RUN apt-get upgrade | |
RUN apt-get install -y php5.6 | |
#https://redis.io/topics/quickstart | |
#https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-redis-on-ubuntu-16-04 | |
RUN apt-get install -y redis-server | |
RUN apt-get install -y php-redis | |
COPY src/ /var/www/html | |
EXPOSE 80 | |
#When Installing apache | |
#W: http://archive.ubuntu.com/ubuntu/pool/main/g/gdbm/libgdbm3_1.8.3-13.1_amd64.deb: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf) | |
#Step 2/11 : RUN apt-get update | |
Reading package lists... | |
W: http://archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/by-hash/SHA256/8d6ab57abf517d7712e4e4d23d762485af49f8140a83b221ea7282f82a51c795: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf) | |
Step 4/11 : RUN apt-get install -y vim | |
debconf: delaying package configuration, since apt-utils is not installed | |
Processing triggers for libc-bin (2.23-0ubuntu9) ... | |
W: http://archive.ubuntu.com/ubuntu/pool/main/f/file/file_5.25-2ubuntu1_amd64.deb: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf) | |
Step 2/13 : RUN apt-get update && apt-get install -y --no-install-recommends apt-utils | |
Reading package lists... | |
W: http://archive.ubuntu.com/ubuntu/dists/xenial/main/binary-amd64/by-hash/SHA256/8d6ab57abf517d7712e4e4d23d762485af49f8140a83b221ea7282f82a51c795: Automatically disabled Acquire::http::Pipeline-Depth due to incorrect response from server/proxy. (man 5 apt.conf) | |
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-utils amd64 1.2.24 [197 kB] | |
debconf: delaying package configuration, since apt-utils is not installed | |
Step 3/13 : RUN apt-get install software-properties-common | |
0 upgraded, 74 newly installed, 0 to remove and 0 not upgraded. | |
Need to get 23.9 MB of archives. | |
After this operation, 110 MB of additional disk space will be used. | |
Do you want to continue? [Y/n] Abort. | |
The command '/bin/sh -c apt-get install software-properties-common' returned a non-zero code: 1 | |
FROM php:5-apache must install: | |
php redis | |
redis-server | |
apache modules - Apache Module mod_rewrite #https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_rewrite | |
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message | |
FROM php:5-apache | |
RUN apachectl -M | |
RUN a2enmod rewrite | |
RUN a2enmod expires | |
RUN service apache2 restart | |
RUN apachectl -M | |
RUN php -m | |
RUN apt-get update | |
RUN php -m | |
RUN apt-get install -y php5-redis | |
RUN apt-get install -y redis-server | |
#RUN redis-server | |
RUN cp /etc/php5/mods-available/redis.ini /usr/local/etc/php/conf.d && ln -s /usr/lib/php5/20131226/redis.so /usr/local/lib/php/extensions/no-debug-non-zts-20131226/redis.so | |
RUN php -m | |
COPY manyvids/ /var/www/html | |
#COPY src/ /var/www/html | |
EXPOSE 80 | |
#CMD ["redis-server"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment