after you have setup docker on your system like this (debian/ubuntu) or like this (fedora/redhat/centos)

and have started the docker service (does not autostart per default):

service docker start

# tested on
   Static hostname: DebianLaptop
         Icon name: computer-laptop
           Chassis: laptop
  Operating System: Debian GNU/Linux 9 (stretch)
            Kernel: Linux 4.9.0-8-amd64
      Architecture: x86-64

run firefox in docker:

you can even run Eclipse inside docker!