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

Base on official PHP 7.0 Alpine image #21

Closed
wants to merge 9 commits into from
Closed

Base on official PHP 7.0 Alpine image #21

wants to merge 9 commits into from

Conversation

kusmierz
Copy link

see #16 and #20

&& 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", "--"]

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?

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

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 ?

Copy link
Author

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

@mathroc
Copy link

mathroc commented Apr 11, 2016

seems good to me! 👍

@kusmierz
Copy link
Author

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 wget (system one or from apk, but system's is without https support).

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
Copy link
Author

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?

Copy link

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

Copy link
Owner

Choose a reason for hiding this comment

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

👍 Afaict these have only been moved (see also #8 and #4).

@kusmierz kusmierz changed the title #16 php 7.0 support #16 alpine php 7.0 support Apr 11, 2016
@mathroc
Copy link

mathroc commented Apr 11, 2016

@kusmierz if ADD works I'm fine with it. (dont' mind either way)

@kusmierz kusmierz mentioned this pull request Apr 11, 2016
@mathroc mathroc mentioned this pull request Apr 11, 2016
6 tasks
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

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

Copy link
Author

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?

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.

Copy link
Author

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?

Copy link
Owner

@clue clue Apr 11, 2016

Choose a reason for hiding this comment

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

But I do think, we should tag the releases here, starting now.

See also #6 and #5. I think this is a bad fit for this PR, but I'm open to discussing this. So I'd vote for removing this from this PR for now in order to ease the discussion 👍

In other words: The current changeset LGTM 👍

@kusmierz kusmierz mentioned this pull request Apr 11, 2016

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/
Copy link
Owner

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)

Copy link
Author

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.

Copy link
Owner

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.

Copy link
Owner

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.

Copy link
Author

Choose a reason for hiding this comment

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

There was PR/issue about it, created by @mathroc #20.

@mathroc
Copy link

mathroc commented Apr 11, 2016

@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:

  • master branch have SOMETHING_VERSION=latest and configured on docker hub to auto build as tag latest
  • releases branch with fixed version and tags Vx.x.x and tags are set to build automatically on docker hub too

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 ?

@kusmierz
Copy link
Author

👍

@kusmierz
Copy link
Author

@mathroc any chances to push this version into the wild?

@mathroc
Copy link

mathroc commented Apr 18, 2016

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 alpine un docker hub until it's a bit more tested)

@mikehaertl
Copy link

@mathroc @kusmierz I think it's not helpful for @clue to have 3 open PRs here now. Could you maybe close the irrelevant ones? Would be great to finally see some progress here.

@clue clue changed the title #16 alpine php 7.0 support Base on official PHP 7.0 Alpine image May 4, 2016
ADD php.ini /usr/local/etc/php/conf.d/php.ini

## install adminer and default theme
ENV ADMINER_VERSION 4.2.4
Copy link
Author

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?

Choose a reason for hiding this comment

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

@kusmierz See the discussion here: #5

Copy link
Author

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

Copy link
Owner

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? :)

Copy link
Author

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.
@mathroc
Copy link

mathroc commented Jun 7, 2016

@clue do you think it can be merged once rebased (/ping @kusmierz ) ? or do you have other suggestions ?

@clue
Copy link
Owner

clue commented Jun 7, 2016

@clue do you think it can be merged once rebased

Afaict there are still some outstanding, uncommented issues in this PR, other than that I'm good with this change 👍

@@ -1,35 +1,35 @@
FROM ubuntu-debootstrap:14.04
FROM php:7.0.7-alpine
Copy link

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 ?

Copy link
Author

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?

Copy link

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

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)

Copy link
Author

@kusmierz kusmierz Sep 5, 2016

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.

@mathroc
Copy link

mathroc commented Sep 3, 2016

@kusmierz I've made a few more comments, do you mind taking a look and rebasing the PR ?

@clue is there still issues you'd like to be taken care for this PR? moving to php -S in another PR before this one maybe ?

@kusmierz
Copy link
Author

kusmierz commented Sep 5, 2016

@clue do we really need ODBC (#15)? It makes only problems (749192d)...

@kusmierz kusmierz closed this by deleting the head repository Sep 23, 2024
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