From 9a76e52f0947ee80cd9fbeaa00ca6c3e2856ef7e Mon Sep 17 00:00:00 2001 From: muibusan Date: Sat, 10 Aug 2019 14:32:34 +0200 Subject: [PATCH] Showing how to bind host-port in the docker directive to a fixed IP and hence not expose it to all IPs on the network --- Starting-a-Container.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Starting-a-Container.md b/Starting-a-Container.md index 2d56276..6b8227b 100644 --- a/Starting-a-Container.md +++ b/Starting-a-Container.md @@ -12,6 +12,13 @@ sudo podman run -d --name bitwarden -v /bw-data/:/data/:Z -p 80:8080 bitwardenrs This will preserve any persistent data under `/bw-data/`, you can adapt the path to whatever suits you. -The service will be exposed on port 80 or 8080. +The service will be exposed on host-port 80 or 8080. -For non-x86 hardware or to run specific version, you can [[choose some other image|Which-Docker-image-to-use]]. \ No newline at end of file +For non-x86 hardware or to run specific version, you can [[choose some other image|Which-Docker-image-to-use]]. + +If your docker/bitwarden_rs runs on a device with a fixed IP, you can bind the host-port to that specific IP and hence prevent exposing the host-port to the whole world or network. Add the IP address (e.g. 192.168.0.2) in front of the host-port and container-port as follows: + +``` +# using Docker: +docker run -d --name bitwarden -v /bw-data/:/data/ -p 192.168.0.2:80:80 bitwardenrs/server:latest +``` \ No newline at end of file