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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alpine php-fpm images #54

Closed
wants to merge 2 commits into from
Closed

alpine php-fpm images #54

wants to merge 2 commits into from

Conversation

eniac111
Copy link

@pierreozoux please, check it :)

Cheers!

@tilosp tilosp changed the title php-fpm images alpine php-fpm images Mar 18, 2017
@@ -0,0 +1,67 @@
FROM php:7.0-fpm-alpine
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use the same php version as used by the other images, this would mean for nextcloud 9/10 php 5.6 and for nextcloud 11 php 7.1.

@@ -4,10 +4,13 @@ services: docker
env:
- VERSION=11.0 VARIANT=fpm
- VERSION=11.0 VARIANT=apache
- VERSION=11.0 VARIANT=alpine-fpm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also you should use update.sh to generate the Dockerfiles and update .travis.yml

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. I've been working on this yesterday.

@tilosp tilosp requested a review from pierreozoux March 18, 2017 07:20
Copy link
Member

@pierreozoux pierreozoux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed with @tilosp comments.

Thanks for your work, we are almost there!

&& git checkout php7 \
&& phpize \
&& ./configure \
&& make && make install \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were problems with php7 and Redis when I made the first version of the image but I'll try again. It would be cleaner.
Also, Memcache for php7 was broken then.

Copy link

@JOduMonT JOduMonT Apr 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in PHP7; is'nt it php-memcached instead of memcache ?
here it use alpine + php7 and memcached
https://github.com/linuxserver/docker-nextcloud/blob/master/Dockerfile

--with-freetype-dir=/usr/include/ \
--with-png-dir=/usr/include \
--with-jpeg-dir=/usr/include \
&& NPROC=$(getconf _NPROCESSORS_ONLN) \
Copy link
Member

@pierreozoux pierreozoux Mar 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it save a lot of time? I'd like to have images consistent and have the same logic.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, of course. It's not important. I'll remove it.

&& apk del autoconf make g++ gcc git py-pip zlib-dev \
jpeg-dev libmcrypt-dev libpng-dev openldap-dev \
freetype-dev libjpeg-turbo-dev \
&& rm -rf /var/cache/apk/*
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be possible to have the same layers accross images? This would allow us to DRY things in the future.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'll try to use the same layers for php 5.6.

@tilosp tilosp closed this Mar 26, 2017
@tilosp tilosp reopened this Mar 26, 2017
@tilosp
Copy link
Member

tilosp commented Mar 26, 2017

Closed and reopened to manually trigger a Travis build

@pierreozoux
Copy link
Member

Just adding this email we received:

Hello everyone,

I wasn't sure where to direct this PR, since I don't have a GitHub account (I'd prefer not to create one). If you'd like me to direct it somewhere else, please let me know.

I had a need for some Alpine based Docker images of NextCloud, so I put some together using the official repo. Although, it looks like eniac111 beat me to it. Still, I think my builds are a little bit cleaner (and about 50% smaller). For comparison, I've put them in a table below with relative sizes. Mainly, these are more in-parallel with the templates already provided, and do a bit more cleanup. But as you can see, I think the pay-off speaks for itself in MBs; the final images come in smaller than the php:xx-fpm base images!

I hope that's helpful. If you would like me to amend anything, let me know an I can send a new PR.

Regards,

Deixismou
(Corey M. Bresnan)

E: [email protected]
E:  [email protected]


---- PHP Images

IMAGE  TAG                SIZE

php    7.1-fpm-alpine     69.6 MB
php    7.1-fpm            377 MB
php    7.1-apache         386 MB

php    5.6-fpm-alpine     54.5 MB
php    5.6-fpm            362 MB
php    5.6-apache         371 MB

---- Nextcloud Images

IMAGE                   TAG                 SIZE        COMPARE (% of fpm)

nextcloud (deixismou)   11.0-fpm-alpine     249 MB      40.75%
nextcloud (eniac111)    11.0-fpm-alpine     456 MB      74.63%
nextcloud               11.0-fpm            611 MB      100%
nextcloud               11.0-apache         620 MB      101.47%

nextcloud (deixismou)   10.0-fpm-alpine     217 MB      37.48%
nextcloud (eniac111)    10.0-fpm-alpine     440 MB      75.99%
nextcloud               10.0-fpm            579 MB      100%
nextcloud               10.0-apache         588 MB      101.55%

nextcloud (deixismou)   9.0-fpm-alpine      210 MB      36.71%
nextcloud (eniac111)    9.0-fpm-alpine      433 MB      75.70%
nextcloud               9.0-fpm             572 MB      100%
nextcloud               9.0-apache          581 MB      101.57%


The following changes since commit 2fcbef5c185891c5996a818c9d6d124481487a52:

  Fix failing docker build (2017-03-14 16:54:50 +0000)

are available in the git repository at:

  https://[email protected]/deixismou/docker-nextcloud.git master

@pierreozoux
Copy link
Member

To keep in mind before merging: #65 (comment)

@tilosp
Copy link
Member

tilosp commented Sep 24, 2017

Closing this for now

@tilosp tilosp closed this Sep 24, 2017
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

Successfully merging this pull request may close these issues.

4 participants