0

I am using a Synology KMU NAS. On that NAS I have installed the GitLab Docker container that seems to have a bug. That bug causes the Software to refuse to send administrative e-mails without authentication. There is an environment variable SMTP_AUTHENTICATION that is passed to GitLab but it seems the non-authenticated configuration (supported by omnibus-gitlab according to the maintainer) is not passed correctly and falls back to "Login" instead.

Since our central IT service provides an un-authenticated SMTP server only (at least for non-personal use), I need to take care of the problem until Synology (maybe) fixes the problem in the future.

My idea is to modify the docker container so it passes the proper options to GitLab. I guess the error is trivial. However I have never used Docker containers before.

Is there a way to modify the docker container? What do I need to do?

Silicomancer
  • 182
  • 7

1 Answers1

1

You can create your own container that depends on the container you want to modify. I once did this with a mariadb container that wouldn't start a galera cluster because a binary that was needed for a test was in the wrong place in the container.

To create your own container, you only need a few steps. I ran this on the host where I wanted to start the container, not sure if this works on your NAS:

  1. Create an empty directory and change into it
  2. Create a file called Dockerfile inside that directory

    FROM kolla/ubuntu-binary-mariadb:queens
    COPY resolveip /usr/sbin/resolveip
    CMD ["dumb-init", "--single-child", "--", "kolla_start"]
    

    (FROM: The image you want to inherit from; COPY The modified files you want to copy into the image; CMD the start command of the original image. You can find it easily using docker inspect CONTAINER.)
    To copy a file out of the container to modify it you can use: $ docker cp CONTAINER:/path/to/file .

  3. Build the container:

    docker build --tag=kolla/ubuntu-binary-mariadb:queens .
    

I needed to keep the original name and tag because the image was provisioned along with others. Since the newly created image was available local, and was newer than the images on the docker repository it was used during deployment automatically. If you don't need this you can give it your own name and just start a container from that image.

Gerald Schneider
  • 19,757
  • 8
  • 52
  • 79