Do you mean your target database to write with is running on your Host machine? and your clients that would write runs inside the container? If so, you can publish a port from your Host machine to your containers then inside your container, you can access your Host machine's port.
$ docker run --name my-database-client-1 -p 8086:8086 ...
Or, if your database also runs inside the container, it's better to use a network then reference your server-database using its container name i.e. my-database-server:8086
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…