Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update #6

Closed
bertalanimre opened this issue Jan 8, 2016 · 3 comments
Closed

Update #6

bertalanimre opened this issue Jan 8, 2016 · 3 comments

Comments

@bertalanimre
Copy link

Hello There!

Thanks for the nice build. If I pull it, it works like a charm. 馃憤
However, I want to refresh it to PHP 5.6, so I wanted to build the image myself with the help of your README. I've added the following between line 6 and 7:
apt-get install -y software-properties-common &&
add-apt-repository ppa:ondrej/php5-5.6 && \

These make the build fail. No matter, let's try to build it the way you ment it. Then it errors me with the COPY part. When I comment it out it works again. Builds the image.
OK, let's run it. Doesn't work, sais something about the entrypoint.... Must be an adhoc error, let's run it again. It runs, but the mysql fails to work just like here:
fredericlb/docker-phabricator#1

Can you help me hoe to upgrade your image with php 5.6?

@stenote
Copy link
Owner

stenote commented Jan 8, 2016

Hi. I solved your problem !

I think it's not a better way to install software-properties-common and use add-apt-repository command to add a ppa repository, 锛坆ecause it will make image so big). So, I add a new source.list to image, and use apt-key command add ppa keys, At last, I solved your problem

Dockerfile:

FROM ubuntu:latest

ENV DEBIAN_FRONTEND noninteractive

## Install php nginx mysql supervisor
COPY php5.6.list /etc/apt/sources.list.d/php5.6.list

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E5267A6C && \
    apt-get update && \
    apt-get install -y php5-fpm php5-cli php5-gd php5-mcrypt php5-mysql php5-curl \
                       nginx \
                       curl \
               supervisor && \
    echo "mysql-server mysql-server/root_password password" | debconf-set-selections && \
    echo "mysql-server mysql-server/root_password_again password" | debconf-set-selections && \
    apt-get install -y mysql-server && \
    rm -rf /var/lib/apt/lists/*

## Configuration
RUN sed -i 's/^listen\s*=.*$/listen = 127.0.0.1:9000/' /etc/php5/fpm/pool.d/www.conf && \
    sed -i 's/^\;error_log\s*=\s*syslog\s*$/error_log = \/var\/log\/php5\/cgi.log/' /etc/php5/fpm/php.ini && \
    sed -i 's/^\;error_log\s*=\s*syslog\s*$/error_log = \/var\/log\/php5\/cli.log/' /etc/php5/cli/php.ini && \
    sed -i 's/^key_buffer\s*=/key_buffer_size =/' /etc/mysql/my.cnf

COPY files/root /

WORKDIR /var/www/

VOLUME /var/www/

EXPOSE 80

ENTRYPOINT ["/entrypoint.sh"]

php5.6.list is here

deb http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main
deb-src http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main

Maybe , you need to read this

PS: on page PPA for PHP 5.6, you can click Technical details about this PPA to get the Signing key

Best wishes for you.

PSS: nothing changed with MySQL, Nginx

@bertalanimre
Copy link
Author

You are a wizard man! :)

Thank you very mutch!

@stenote
Copy link
Owner

stenote commented Jan 8, 2016

Try that.

If it's work, please close this comment. At last, have a nice weekend !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants