adding firefox image to the subuser

I followed all the steps to create subuser given on subuser.org

I am not able to create firefox image and not able to restrict the access to the Downloads folder as given in the video and documentation

  • Is it possible to create a docker image from Ubuntu ISO on Windows offline?
  • Can I obtain real user ip with “iptables”: false enabled?
  • docker compose inside docker machine, can't mount volume
  • nginx timeout after https proxy to localhost
  • Error reading webpack-stats.json
  • Record local audio in a docker container
  • Please provide me with the solution. i need it for my project

  • How to deploy code from localhost to docker containers using Git?
  • “docker pull ubuntu ” doesn't work
  • Need floating IPs to create a container in IBM Bluemix (BXNUI0110E)
  • Remote Debugging From Local to Remote Host Docker Container
  • Trying to transfer big file docker container Error response from daemon: ApplyLayer exit status 1 stdout: stderr: unexpected EOF
  • docker routing no iptables
  • One Solution collect form web for “adding firefox image to the subuser”

    You would create a folder my-subuser-images and then create a second folder firefox in the first one:

    my-subuser-images/firefox

    In the firefox folder, you need to create yet another sub-folder: docker-image

    Once you have done that you need to create two files:

    permissions.json
    

    And

    docker-image/SubuserImagefile
    

    Your file layout should look like the one found at the subuser-default-repository

    In the permissions.json file, you tell subuser what Firefox is allowed to do:

    {"description":"A popular web browser."
    ,"maintainer":"student"
    ,"executable":"/usr/bin/firefox"
    ,"gui":{"clipboard":true}
    ,"sound-card":true
    ,"allow-network-access":true
    ,"basic-common-permissions":true}
    

    Here is an overview of the permissions that I just set:

    "gui": Allows Firefox to display windows to X11 securely using the XPRA X11 bridge
    "sound-card": Allows Firefox to communicate with your sound card
    "allow-network-access": Allows Firefox to access the network
    "basic-common-permissions": Allows Firefox to do some basic things like save settings to it's own specially contained home directory, see the LOCAL and timezone ect.
    

    It does NOT however, allow Firefox to access any files outside of it’s own subuser. You could add a user-dirs permission to allow it to access the Downloads directory, for example, if you wished.

    Once you have created a permissions.json file, you can go on to create a SubuserImagefile.

    The docker-image/SubuserImagefile should look just like a Dockerfile:

    FROM ubuntu
    RUN apt-get update && apt-get upgrade -y && apt-get install -yq firefox

    Now you are done setting up your subuser image.

    You can create a firefox subuser by running:

    $ subuser subuser add firefox firefox@/home/student/my-subuser-images
    

    You can run the firefox subuser by running:

    $ subuser run firefox
    

    You can create more than one firefox subuser. This is useful, if you want to have more than one Facebook account or Google account and not have to log out/in all the time. It is also usefull if you want to reduce the risk of cross-site scripting when you do internet banking.

    subuser subuser add internet-banking firefox@/home/student/my-subuser-images

    You can run your internet-banking subuser with the command

    subuser run internet-banking

    You can access a subuser’s home directory by visiting ~/.subuser/homes.

    You can share your subuser images with others, to reduce the burden of sandboxing applications for everybody. If you want to share your Firefox image, you can cd to my-subuser-images and turn that folder into a git repository:

    $ cd ~/my-subuser-images
    $ git init
    $ git add .
    $ git commit -m "Add Firefox image"
    

    If you then push this git repo somewhere, then others can install your Firefox image easilly with the command:

    $ subuser subuser add firefox firefox@http://example.com/student/my-subuser-images.git

    They would run that subuser in the same way as if they had done the setup locally.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.