mailcow / mailcow-dockerized

mailcow: dockerized - 🐮 + 🐋 = 💕
https://mailcow.email
GNU General Public License v3.0
8.34k stars 1.13k forks source link

Rebuild docker images #5058

Closed christianbur closed 1 year ago

christianbur commented 1 year ago

Summary

I would like to ask you to rebuild the Docker images so that the current point-release (Alpine Linux 3.17.2 and Debian 11.6) are used.

Current status:

# mailcow container #########################################
             Alpine Linux v3.17"--3.17.0 -- ["'mailcowdockerized-clamd-mailcow-1'", "'mailcowdockerized-netfilter-mailcow-1'", "'mailcowdockerized-ofelia-mailcow-1'", "'mailcowdockerized-olefy-mailcow-1'", "'mailcowdockerized-unbound-mailcow-1'", "'mailcowdockerized-watchdog-mailcow-1'"]
             Alpine Linux v3.17"--3.17.1 -- ["'mailcowdockerized-acme-mailcow-1'", "'mailcowdockerized-dockerapi-mailcow-1'", "'mailcowdockerized-php-fpm-mailcow-1'", "'mailcowdockerized-redis-mailcow-1'"]
             Alpine Linux v3.17"--3.17.2 -- ["'mailcowdockerized-memcached-mailcow-1'", "'mailcowdockerized-nginx-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.3 -- ["'mailcowdockerized-solr-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.5 -- ["'mailcowdockerized-postfix-mailcow-1'", "'mailcowdockerized-rspamd-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.6 -- ["'mailcowdockerized-dovecot-mailcow-1'", "'mailcowdockerized-sogo-mailcow-1'"]
       Ubuntu 20.04.5 LTS"--bullseye/sid -- ["'mailcowdockerized-mysql-mailcow-1'"]
# docker images |grep mailcow
mailcow/sogo              1.115             7849e5fd1071   9 days ago       518MB
mailcow/acme              1.84              edbbd488d5df   2 weeks ago      129MB
mailcow/dockerapi         2.01              3c43c9361100   2 weeks ago      109MB
mailcow/phpfpm            1.82              e62e9db988ba   3 weeks ago      400MB
mailcow/dovecot           1.22              85d7060732b5   3 weeks ago      412MB
mailcow/clamd             1.60              48bc478641c9   7 weeks ago      240MB
mailcow/netfilter         1.50              267544fd8aba   7 weeks ago      97.5MB
mailcow/olefy             1.11              dc20d197c375   7 weeks ago      117MB
mailcow/rspamd            1.92              a8fc31c5bb15   2 months ago     175MB
mailcow/watchdog          1.97              4257421a67f3   2 months ago     109MB
mailcow/unbound           1.17              c598d0f18d18   2 months ago     17.7MB
mailcow/postfix           1.68              6e7a455cb03e   4 months ago     270MB
mailcow/solr              1.8.1             501bd71a4aee   10 months ago    450MB

Motivation

Systems should be up to date for safety reasons.

Additional context

No response

MAGICCC commented 1 year ago

@DerLinkman Maybe we can redo https://github.com/mailcow/mailcow-dockerized/blob/master/.github/workflows/image_builds.yml to allow pushing to the hub? It should be safe because it's only OS updates...

DerLinkman commented 1 year ago

Images are rebuild for 2022-03.

Can you tell me how you made this "table" here?

# mailcow container #########################################
             Alpine Linux v3.17"--3.17.0 -- ["'mailcowdockerized-clamd-mailcow-1'", "'mailcowdockerized-netfilter-mailcow-1'", "'mailcowdockerized-ofelia-mailcow-1'", "'mailcowdockerized-olefy-mailcow-1'", "'mailcowdockerized-unbound-mailcow-1'", "'mailcowdockerized-watchdog-mailcow-1'"]
             Alpine Linux v3.17"--3.17.1 -- ["'mailcowdockerized-acme-mailcow-1'", "'mailcowdockerized-dockerapi-mailcow-1'", "'mailcowdockerized-php-fpm-mailcow-1'", "'mailcowdockerized-redis-mailcow-1'"]
             Alpine Linux v3.17"--3.17.2 -- ["'mailcowdockerized-memcached-mailcow-1'", "'mailcowdockerized-nginx-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.3 -- ["'mailcowdockerized-solr-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.5 -- ["'mailcowdockerized-postfix-mailcow-1'", "'mailcowdockerized-rspamd-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.6 -- ["'mailcowdockerized-dovecot-mailcow-1'", "'mailcowdockerized-sogo-mailcow-1'"]
       Ubuntu 20.04.5 LTS"--bullseye/sid -- ["'mailcowdockerized-mysql-mailcow-1'"]
christianbur commented 1 year ago

I wrote a script to get an overview of the versions used in the docker image.

#!/usr/bin/env python3
import subprocess
import typing
from time import gmtime, strftime

def execute_shell_cmd(cmd):
  if isinstance(cmd, str):  
    cmd = cmd.split()

  if not isinstance(cmd, typing.List):
      print("ERROR: cmd not List")
      reutrn ("","")

  #print("cmd: ", cmd, " ---- ", " ".join(cmd) )
  process = subprocess.Popen(cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE)

  output, error = process.communicate()
  (output_utf8, error_utf8) = (output.decode("utf-8"), error.decode("utf-8"))
  return (output_utf8 , error_utf8)

all_docker_container = execute_shell_cmd( "docker ps --format '{{.Names}}'" )

all_os_list = {}
all_os_list["all"] = {}
all_os_list["non_mailcow"] = {}
all_os_list["mailcow"] = {}

for container in sorted(all_docker_container[0].split("\n")):
    if container.strip() == "": continue
    print ("\n" + container)

    all_check_python_cmd = []
    all_check_python_cmd.append( ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'python --version'] )
    all_check_python_cmd.append( ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'python2 --version'] )
    all_check_python_cmd.append( ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'python3 --version'] )

    python_found = []    

    for check_python_cmd in all_check_python_cmd:

      check_python_output = execute_shell_cmd(check_python_cmd)
      if "not found" not in check_python_output[0]:
        if check_python_output in python_found: continue  
        python_found.append(check_python_output)

    if python_found != []:
        print("   Python Version: %s" % ( str(python_found)))

############################################################################################
    check_php_cmd =  ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'php --version |grep built']
    check_php_output = execute_shell_cmd(check_php_cmd)
    if "not found" not in check_php_output[0]:
      print("   PHP Version: %s" % (check_php_output[0].strip() ))

############################################################################################
    check_java_cmd =  ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'java --version']
    check_java_output = execute_shell_cmd(check_java_cmd)
    if "not found" not in check_java_output[0]:
      print("   Java Version: %s" % (check_java_output[0].strip() ))

############################################################################################
    check_date_cmd = "docker exec " + container.replace("'","") + " date"
    check_date_output = execute_shell_cmd(check_date_cmd)
    container_time =  check_date_output[0][:15] + "x:xx " + check_date_output[0][20:]
    host_time = execute_shell_cmd("date")[0][:15] + "x:xx " +  execute_shell_cmd("date")[0][20:]
    if container_time != host_time:
        print("   %s" % (check_date_output[0].strip()))

############################################################################################
    os_version = ""
    os_version_name = ""

    check_os_cmd =  ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'cat /etc/debian_version'] 
    check_os_output = execute_shell_cmd(check_os_cmd)
    if "No such file or directory" not in check_os_output[0]:
        print("   Debian Version: %s" % (check_os_output[0].strip() ))
        os_version = check_os_output[0].strip()

    check_os_cmd =  ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'cat /etc/alpine-release']    
    check_os_output = execute_shell_cmd(check_os_cmd)
    if "No such file or directory" not in check_os_output[0]:
        print("   Alpine Version: %s"  % (check_os_output[0].strip() ))
        os_version = check_os_output[0].strip()

    check_os_cmd =  ['docker', 'exec', '-it', container.replace("'",""), 'sh', '-c', 'cat /etc/os-release | grep PRETTY_NAME']
    check_os_output = execute_shell_cmd(check_os_cmd)
    if "No such file or directory" not in check_os_output[0]:
        print("   %s" % (check_os_output[0].strip() ))
        os_version_name = "%s--%s" % (check_os_output[0].strip().replace('PRETTY_NAME="',"").replace('"--',''), os_version )

        if os_version_name not in all_os_list["all"]:
          all_os_list["all"][os_version_name] = [] 
          all_os_list["non_mailcow"][os_version_name] = []
          all_os_list["mailcow"][os_version_name] = []

        all_os_list["all"][os_version_name].append(container)
        if "mailcow" not in container:
          all_os_list["non_mailcow"][os_version_name].append(container)
        else:
          all_os_list["mailcow"][os_version_name].append(container)

print ("\n##########################################")

print ("\n# all container #########################################")
for os_version_name in sorted(all_os_list["all"]):
  print("%40s -- %s" % (os_version_name, sorted(all_os_list["all"][os_version_name])))

print ("\n# non mailcow container #########################################")
for os_version_name in sorted(all_os_list["non_mailcow"]):
  print("%40s -- %s" % (os_version_name, sorted(all_os_list["non_mailcow"][os_version_name])))   

print ("\n# mailcow container #########################################")
for os_version_name in sorted(all_os_list["mailcow"]):
  print("%40s -- %s" % (os_version_name, sorted(all_os_list["mailcow"][os_version_name])))

After today's mailcow update the table looks like this:

# mailcow container #########################################
             Alpine Linux v3.17"--3.17.0 -- ["'mailcowdockerized-ofelia-mailcow-1'"]
             Alpine Linux v3.17"--3.17.2 -- ["'mailcowdockerized-acme-mailcow-1'", "'mailcowdockerized-clamd-mailcow-1'", "'mailcowdockerized-dockerapi-mailcow-1'", "'mailcowdockerized-memcached-mailcow-1'", "'mailcowdockerized-netfilter-mailcow-1'", "'mailcowdockerized-nginx-mailcow-1'", "'mailcowdockerized-olefy-mailcow-1'", "'mailcowdockerized-php-fpm-mailcow-1'", "'mailcowdockerized-redis-mailcow-1'", "'mailcowdockerized-unbound-mailcow-1'", "'mailcowdockerized-watchdog-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.3 -- ["'mailcowdockerized-solr-mailcow-1'"]
   Debian GNU/Linux 11 (bullseye)"--11.6 -- ["'mailcowdockerized-dovecot-mailcow-1'", "'mailcowdockerized-postfix-mailcow-1'", "'mailcowdockerized-rspamd-mailcow-1'", "'mailcowdockerized-sogo-mailcow-1'"]
       Ubuntu 20.04.5 LTS"--bullseye/sid -- ["'mailcowdockerized-mysql-mailcow-1'"]
christianbur commented 1 year ago

Thanks for updating the mailcow images.

Can you please look at the solr images again, because we still use solr:7.7-slim, but there is already version 9 (https://hub.docker.com/_/solr).

ofelia is unfortunately not so fast with updating https://github.com/mcuadros/ofelia/issues/150

MAGICCC commented 1 year ago

Last time I checked solr they release version 8 and I couldn't migrate it to 8 somehow, maybe I will try it again...

MAGICCC commented 1 year ago

I also created a PR for updating ofelia, https://github.com/mcuadros/ofelia/pull/211 I hope he's fast

DerLinkman commented 1 year ago

Can you please look at the solr images again, because we still use solr:7.7-slim, but there is already version 9 (https://hub.docker.com/_/solr).

Solr will anyways be kicked out this year (if anything goes correct) so no more support on that.

christianbur commented 1 year ago

Then thank you for rebuilding the imges. I close the ticket.