-
Notifications
You must be signed in to change notification settings - Fork 38
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
Base on official PHP 7.0 Alpine image #21
Conversation
&& ln -s ../../upload_large_dumps.ini /etc/php5/cli/conf.d | ||
## Add Tini | ||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ tini | ||
ENTRYPOINT ["/usr/bin/tini", "--"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kusmierz Why do you add a init system? Why not rely on the default CMD
from the official php-7 image?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never mind, i found the related discussion and the reference to #17
…r rebuild, when new adminer version will arrive).
## Add the files | ||
ADD php.ini /usr/local/etc/php/conf.d/php.ini | ||
|
||
## install adminer and default theme | ||
ENV ADMINER_VERSION 4.2.4 | ||
|
||
RUN mkdir -p /var/www | ||
ADD https://www.adminer.org/static/download/$ADMINER_VERSION/adminer-$ADMINER_VERSION.php /var/www/index.php | ||
ADD http://www.adminer.org/static/download/$ADMINER_VERSION/adminer-$ADMINER_VERSION.php /var/www/index.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why the change to https ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By mistake, I've reverted it in e6f58f2
seems good to me! 👍 |
I just thinking about difference between: ADD http://www.adminer.org/static/download/$ADMINER_VERSION/adminer-$ADMINER_VERSION.php /var/www/index.php and downloading it using Mainly first one will download each and every time on build, and wget will probably use cached version. @mathroc what do you think? |
@@ -0,0 +1,4 @@ | |||
upload_max_filesize = 2000M | |||
post_max_size = 2000M | |||
memory_limit = -1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it good idea to set here unlimited execution time and no memory limit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exports & imports can take a very long time, not sure what would be enough and reasonnable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kusmierz if |
Always download latest version of adminer.
EXPOSE 80 | ||
## install adminer and default theme | ||
RUN mkdir -p /var/www | ||
ADD http://www.adminer.org/latest.php /var/www/index.php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should create tags for this image, that are in sync with adminer (e.g. clue/adminer:4.2.4
). So instead of latest
we should point to the specific version https://www.adminer.org/static/download/4.2.4/adminer-4.2.4.php
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so too, but as long as we have no tags here, I think it would be better to have latest.
Anyway, we could have tags like apache, alpine-php56, alpine-php7, etc. But do you think is worth for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need different variants (alpine, php56, ...). But I do think, we should tag the releases here, starting now. That's why I'm still for changing the URL.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clue what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf | ||
CMD supervisord -c /etc/supervisor/conf.d/supervisord.conf | ||
CMD php -S 0.0.0.0:80 -t /var/www/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really want to use PHP's built-in webserver here? (open for discussion)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about this for some time too. @mathroc proposed this solution in #20.
I even made Dockerfile
with nginx and php-fpm before, but I think @mathroc is right (but only in this particular case, see good explanation in smebberson/docker-alpine/alpine-nginx, "Aren't you only supposed to run one process per container?").
But, as we think about adminer - is dev tool, obviously. When we add nginx (at least 2 processes) and php-fpm (at least another 2) + supervisor or even smaller s6 instead only one (php's built-in webserver) it becomes a little bit overcomplicated.
+1 for @mathroc solution here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're making some very valid points here 👍
However, I'm not sure this should be discussed as part of this PR. I understand where you're coming from, but this particular statement is very well worth discussing IMHO:
But, as we think about adminer - is dev tool, obviously
Would you care to file a separate issue for this? 👍
As an alternative, we could also discuss this in a separate PR, as we can also change to this in our current image without switching to Alpine first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping, any thoughts on this, anybody?
IMO this change alone already warrants a separate PR / discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@clue about your [comment on versionning](https://github.com/clue/docker-adminer/pull/19#discussion_r59180165], with the docker hub we can provide both the latest and tagged release. in other images I'm doing it this way:
anyway, this can be done in a second time, @kusmierz what do you think about sticking with latest for the time being and working on tags later ? |
👍 |
@mathroc any chances to push this version into the wild? |
I don't have more comment for this PR. it's ready as far as I'm concerned. it's up to @clue to either merge this into master or in another branch (to tag it |
ADD php.ini /usr/local/etc/php/conf.d/php.ini | ||
|
||
## install adminer and default theme | ||
ENV ADMINER_VERSION 4.2.4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it better download "latest" or having const with version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks @mikehaertl I knew I've seen it somewhere :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some discussion about this in #5, however until we get to solve this I would vote to not introduce any additional changes in this PR 👍 (In other words, revert this change and)
After all, this PR ought to be about Alpine, right? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Tini has been relocated to /sbin/tini. Please update your scripts to use /sbin/tini going forward. /usr/bin/tini has been preserved for backwards compatibility in Alpine 3.4, but WILL BE REMOVED in Alpine 3.5.
Afaict there are still some outstanding, uncommented issues in this PR, other than that I'm good with this change 👍 |
…adminer into feature/16-alpine-php70
@@ -1,35 +1,35 @@ | |||
FROM ubuntu-debootstrap:14.04 | |||
FROM php:7.0.7-alpine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe 7-alpine
or at least 7.0-alpine
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7-alpine
is dangerous - why if they change something in ie. 7.2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct
WORKDIR /var/www | ||
RUN chown www-data:www-data -R /var/www | ||
## Add Tini | ||
RUN apk add --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ tini |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpine version of official php images has been upgraded and it includes tini in the defauls packages list now. no need for the custom repository anymore (might even not work anymore)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I've seen it before, but had no time to update it. Thanks.
see #16 and #20