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

start with alpine to reduce the image size #11

Open
michield opened this issue Jan 13, 2021 · 6 comments
Open

start with alpine to reduce the image size #11

michield opened this issue Jan 13, 2021 · 6 comments

Comments

@michield
Copy link
Member

See also https://mantis.phplist.org/view.php?id=20318

It would be nice to start from alpine, as that will presumably reduce the overall image size.

@doc75
Copy link

doc75 commented Jan 24, 2021

@michield , as requested, here is a first version of the phplist alpine based image.
I am not creating a PR for now as the format is really different from what you propose in your base image.

I would prefer that we iterate through this issue and converge on something workable for you before submitting a PR.

Here is the necessary to build the image itself:

phplist-alpine.zip

To ensure the mail part is working you need to have a mail server available and define the following variables (in docker-compose env file for example):

PHPLIST_PHPMAILERHOST=smtp.domain.com
PHPLIST_PHPMAILERPORT=587
PHPLIST_PHPMAILER_SECURE=tls
[email protected]
PHPLIST_PHPMAILER_SMTPPASSWORD=your_mail_at_domain.com_passsword
[email protected]
PHPLIST_BOUNCE_MAILBOX_HOST=imap.domain.com
PHPLIST_BOUNCE_MAILBOX_PORT=993/imap/ssl/novalidate-cert

Of course the docker-compose file should contain a MariaDB and Apache/NGINX server.
I have a production working environment but it also relies on traefik as the frontend, so probably more complex to adapt if we want NGINX to be the frontend.

Any comment/suggestion is welcome so that I rework this to make it compatible to your needs.
I guess you might have also some advice to improve the image (it is certainly not perfect as it is).

@michield
Copy link
Member Author

Thanks, I've branched to https://github.com/phpList/phplist-docker/tree/from_alpine with your version, so we can work on it from there. Are you familiar with the Github forking and PR processes? That's the easiest way to contribute.

@doc75
Copy link

doc75 commented Jan 28, 2021

@michield , Yes I know how to contribute. This is great that you setup a specific branch.
I'll see how I can fit in this.
Any guidelines on your side ?

@michield
Copy link
Member Author

No, I'd say, fork it, work on it to make it do what you want to achieve and when you're done and think it's worth merging, we can have a look. We may need to work to handle the different environment variables, but that's fairly trivial.

Your image is 174MB on my system, and mine is 472MB, so it's a great improvement

@bfranske
Copy link

FWIW I am working on running phpList on Alpine in a Docker container for production use behind an nginx reverse proxy. I'm playing around with this at https://github.com/bfranske/phplist-alpine/ but don't know how far I'll get how quickly.

@michield
Copy link
Member Author

Be aware that phpList is not so great at "URL detection" when behind proxies. I'm trying to work on this here phpList/phplist3#914

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

3 participants