Skip to content

alpine php-fpm images - #54

Closed
eniac111 wants to merge 2 commits into
nextcloud:masterfrom
eniac111:master
Closed

alpine php-fpm images#54
eniac111 wants to merge 2 commits into
nextcloud:masterfrom
eniac111:master

Conversation

@eniac111

Copy link
Copy Markdown

@pierreozoux please, check it :)

Cheers!

@tilosptilosp changed the title php-fpm imagesalpine php-fpm imagesMar 18, 2017
@@ -0,0 +1,67 @@
FROM php:7.0-fpm-alpine

Copy link
Copy Markdown
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.

Comment thread.travis.yml
env:
- VERSION=11.0 VARIANT=fpm
- VERSION=11.0 VARIANT=apache
- VERSION=11.0 VARIANT=alpine-fpm

Copy link
Copy Markdown
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
Copy Markdown
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 pierreozouxMarch 18, 2017 07:20

@pierreozouxpierreozoux left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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.

@JOduMonTJOduMonTApr 20, 2017

Copy link
Copy Markdown

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) \

@pierreozouxpierreozouxMar 21, 2017

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@tilosptilosp closed this Mar 26, 2017
@tilosptilosp reopened this Mar 26, 2017
@tilosp

Copy link
Copy Markdown
Member

Closed and reopened to manually trigger a Travis build

@pierreozoux

Copy link
Copy Markdown
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: deixismou@protonmail.ch
E: corey.bresnan@protonmail.ch
---- 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://deixismou@gitlab.com/deixismou/docker-nextcloud.git master

@pierreozoux

Copy link
Copy Markdown
Member

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

@tilosp

Copy link
Copy Markdown
Member

Closing this for now

@tilosptilosp closed this Sep 24, 2017
Sign up for freeto 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

@eniac111@tilosp@pierreozoux@JOduMonT