-1

I'm setting up Gitlab instance. And setting up email notifications...

I have the email server postfix running on the host..

In the config gitlab.rb I can set the following email server settings

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = "gitlab.simplycreate.online"
gitlab_rails['smtp_port'] = 25

As I can see the smtp_address needs a FQDN and not IP. The problem is Gitlab requires the container hostname set same as the main hosts hostname so I cant use it here!? Is there a way to point it to the host address?

Adrian Mole
  • 49,934
  • 160
  • 51
  • 83
Anton A
  • 171
  • 5

1 Answers1

1

If you run your container with --net=host you can access to your host by localhost.

from version 20.10 you can run your container with --add-host=host.docker.internal:host-gateway and access to your host by host.docker.internal

Xirehat
  • 1,155
  • 1
  • 8
  • 20