Comments (12)
My suggestion is to only take advantage of current entrypoint. The initial database installation can be tackled by: https://github.com/docker-library/mariadb/blob/master/docker-entrypoint.sh#L314
The tricky portion will be upgrade between versions of iRedMail.. My suggestion is to "inherit" current entry point and add the "upgrade" part.
from dockerized.
I must say, I like you decided to use the "decompose" approach because this approach allows using an external database. Quite a lot of people are calling for that.
from dockerized.
Could you help write one entrypoint script for Alpine docker image? With volume support.
I tried alpine and install mariadb inside the container, but each time I use volume (a local directory) for /var/lib/mysql, it failed to initialize. You can check the entrypoint script I used from git history.
from dockerized.
No problem. However, my suggestion here is to use mariadb docker image as a base. Unless you have any good reason having everything on Alpine. My perspective is you should be using current standard images as a base and only customize them - mariadb example. In case there is no customizable image, go and build the new image from scratch using generic base images, e.g., alpine, etc..
Let me prepare the mariadb-iredmail based on standard mariadb image..
from dockerized.
Currently the docker-compose.yml uses official mariadb image (10.4) and it works. I want to figure out why an alpine image with mariadb package doesn’t work with volume.
I’d like to see whether it’s better to use official mariadb image or just build one with alpine. It’s not decided yet, but need some evaluation.
Besides SOGo groupware, all other packages SHOULD be able to run on alpine, it’s simpler and smaller. :)
from dockerized.
I see. I usually tend to use available images because entry-points are already covering all I would be writing. However, your point is valid considering the mariadb image has 355MB, but alpine only 5MB..
Will look at the oficial/mariadb entrypoint and customize, so it allows
- loading the default schemas and data for iredmail for frech installation
- Upgrade between versions
When this is covered, I think it is time to deal with migration to alpine. Looking at the mariaddb Dockerfile (https://github.com/docker-library/mariadb/blob/master/10.4/Dockerfile), it seems they are only dealing with ubuntu related stuff.. Alpine would make more sense, indeed.
from dockerized.
Can you please provide me SQL file containing full structure we want to have after fresh deployment of mysql server? Thanks
from dockerized.
Thanks for helping. :)
First stage is getting alpine + mariadb + volume working, then I will figure out others.
You can find full SQL template file from iRedMail-0.9.9 package, or the bitbucket repo: https://bitbucket.org/zhb/iredmail/src/default/iRedMail/samples/iredmail/iredmail.mysql
I prepared the sql commands used to upgrade (from 0.9.9) below, but I guess we don’t need it since iRedMail-1.0 will be first version of dockerized edition.
https://bitbucket.org/zhb/iredmail/src/default/extra/update/1.0/
Btw, another reason I want to use alpine for mariadb image is keeping same directory structure as the iRedMail Easy.
from dockerized.
Today I created two branches:
- mariadb - only contains SQL schema based on standard MariaDB docker image..
- mariadb-alpine - Kick off for mariadb installed in Alpine. As an initial try, I decided to use regular MariaDB from repository (this can be changed). Secondary, I migrated entrypoint from official mariadb repository. However, there is something not really working. I spend one hour on it, but then i had to give up in favour of other things at home :-) Will try to look at it.
Interestingly, alpine based image containing MariaDB has 180MB.
from dockerized.
Re-organize the reasons why an Alpine based MariaDB image is preferred. I gave up to build Alpine based image temporarily, but i will try again later.
Cons of official MariaDB image:
-
Not support running shell/SQL scripts each time we launch the container.
Entrypoint script
/docker-entrypoint.sh
runs scripts under/docker-entrypoint-initdb.d/
only once - the time it initializesmysql
database. Whenvmail
database gets some changes, we need to build a new mariadb image and run shell/sql script while launching the image and detect + apply the changes.We can improve
/docker-entrypoint.sh
to achieve this. -
The size is big (355MB), Alpine is 50% small (about 180MB).
-
No
vi
. -
No
cron
for running backup script - unless we do backup outside the container. -
If all images used by dockerized iRedMail is Alpine, the administration will be easier.
-
Build an all-in-one iRedMail docker image will be Ubuntu 18.04 only (the OS used by mariadb official image).
from dockerized.
hi @lejmr
Turns out Docker has issue on Win/macOS platform to use the bind volume, but i use a macOS as daily driver. I will buy a new laptop and run Linux as daily driver to test dockerized iRedMail. Let's forget about the mariadb mount volume issue and move on.
from dockerized.
Forgot to mention, i will build with all Alpine images, no official mariadb image.
from dockerized.
Related Issues (20)
- Enable SMTP SASL AUTH on port 25
- Challenges with randomly set/reset passwords
- How to install custom plugins in roundcube? HOT 3
- Cannot change Maximum allowed file size is 2.0 MB
- Problem with ssl HOT 8
- Disable HTTP to HTTPS redirection HOT 6
- iredmail-docker.conf setting POSTMASTER_EMAIL is ignored, always postmaster@... used HOT 1
- Unable to login into iRedAdmin when using Cloudflare: invalid request block size HOT 3
- MariaDB Settings Ignored HOT 6
- Multiple SSL certs for different domains HOT 1
- Request for production information HOT 5
- Using container as relay for other VM not working HOT 2
- 希望出一个arm的docker镜像,感谢大佬 HOT 1
- Help needed: new Docker image for iRedMail HOT 35
- Why the docker hub iredmail stable image is so old? HOT 2
- password HOT 2
- Development Update
- How to use external mysql storage? HOT 1
- SMTP Smuggling HOT 2
- Roundcube upgrade
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dockerized.