Giter Site home page Giter Site logo

Comments (12)

lejmr avatar lejmr commented on August 10, 2024

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.

lejmr avatar lejmr commented on August 10, 2024

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.

iredmail avatar iredmail commented on August 10, 2024

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.

lejmr avatar lejmr commented on August 10, 2024

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.

iredmail avatar iredmail commented on August 10, 2024

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.

lejmr avatar lejmr commented on August 10, 2024

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.

lejmr avatar lejmr commented on August 10, 2024

Can you please provide me SQL file containing full structure we want to have after fresh deployment of mysql server? Thanks

from dockerized.

iredmail avatar iredmail commented on August 10, 2024

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.

lejmr avatar lejmr commented on August 10, 2024

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.

iredmail avatar iredmail commented on August 10, 2024

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 initializes mysql database. When vmail 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.

iredmail avatar iredmail commented on August 10, 2024

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.

iredmail avatar iredmail commented on August 10, 2024

Forgot to mention, i will build with all Alpine images, no official mariadb image.

from dockerized.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.