-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
19 lines (18 loc) · 849 Bytes
/
docker-compose.yml
File metadata and controls
19 lines (18 loc) · 849 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
services:
network-control-plane:
build:
context: .
dockerfile: Dockerfile
image: network-control-plane:latest
container_name: ncp-container
privileged: true
ports:
- "5001:5001"
volumes:
- .:/workspace
- /sys/fs/cgroup:/sys/fs/cgroup:ro
working_dir: /workspace
stdin_open: true
tty: true
# Start OVS and keep container running
command: /bin/bash -c "mkdir -p /var/run/openvswitch /var/log/openvswitch && (ovs-vsctl show > /dev/null 2>&1 || (ovsdb-server --detach --pidfile=/var/run/openvswitch/ovsdb-server.pid --remote=punix:/var/run/openvswitch/db.sock --log-file=/var/log/openvswitch/ovsdb-server.log && sleep 2 && ovs-vswitchd --detach --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --log-file=/var/log/openvswitch/ovs-vswitchd.log && sleep 2)) && tail -f /dev/null"