Playing with docker in an app-vm

266 views
Skip to first unread message

Opal Raava

unread,
Nov 24, 2016, 8:05:30 AM11/24/16
to qubes-users

Hi all,

I've not seen many docker posts, but for the heck of it I'd like to report on how I made an app-vm that has a website running in docker and reachable by everything connected to sys-firewall.

1) install docker in fedora-24, dnf install docker

2) create the new appvm, I called it 'docker'

3) in that app-vm in /rw/config/rc.local, i put:

rm -rf /var/lib/docker
ln -s /home/user/docker /var/lib/docker
systemctl start docker

, and I made the dir in /home/user/docker
now as root i can use 'docker ps' and everything.


4) networking, making 'docker' visible:
on docker app-vm in /rw/config/qubes-firewall-user-script, i put:

iptables -I INPUT -s 10.137.2.0/24 -j ACCEPT

on sys-firewall, in /rw/config/qubes-firewall-user-script, i put:

iptables -I FORWARD 2 -s 10.137.2.0/24 -d $(docker-appvm-ip) -j ACCEPT

Ok, that's all i have on docker, and it works great.

Opal Raava

unread,
Nov 24, 2016, 8:07:46 AM11/24/16
to qubes-users

Edit: your network is perhaps different from 10.137.2.0/24, sorry

Grzesiek Chodzicki

unread,
Nov 24, 2016, 11:30:52 AM11/24/16
to qubes-users
10.137.2.0?24 is the IP addres of your sys-firewall machine, right? I'm trying to apply a similar configuration to my qubes instance.

Opal Raava

unread,
Nov 24, 2016, 2:03:41 PM11/24/16
to qubes-users
Yea, it's the network provided by sys-firewall. I look at the ip number of an appvm using sys-firewall to figure out my net(mask)

Opal Raava

unread,
Nov 24, 2016, 2:13:21 PM11/24/16
to qubes-users
10.137.2.0/24 is a network specification of all hosts, a way of saying 10.137.2.*, i dont think the ip number of the sys-firewall comes into it. Its probably got an ip of 10.137.2.1 orso

dba...@gmail.com

unread,
Feb 21, 2018, 3:00:54 AM2/21/18
to qubes-users
Hello Opal Raava.

Thanks for this post.
I am newbie in Qubes OS.
I'd like to create an appVM having an HTTPS (Port 443) website running in docker.
When i start the docker container i set the following option : -p 2443:443

But, i failed with configurating sys-firewall, and my browser refuses to access to the https website.


Did you met this case ?

Thanks for you ideas around the sys-firewall/https forward.

Regards

Mac
Reply all
Reply to author
Forward
0 new messages