version: '3.7'
services:
srv:
image: ubuntu
network_mode: host
version: '3.7'
services:
srv:
build:
contex: .
dockerfile: Dockerfile
network: host
version: '3.7'
services:
srv:
image: ubuntu
stdin_open: true
tty: true
After that you can run service as daemon and run bash:
$ docker-compose up -d
$ docker-compose exec srv bash