Code Monkey home page Code Monkey logo

docker_gui's Introduction

Docker GUI

This project offers multiple Dockerfile/docker-compose.yml pairs to create containers that can launch GUI application on the same display as the host using X11 sharing.

How to start

  • Launch the create_container.sh <container_name> <non_root_user> <install_path> with the following parameters:
    • container_name: the name folder containing the app you want to launch
    • non_root_user: a non root user that will be created, its home folder will contain a shared folder
    • install_path: the path to a folder that will contain the build content (Dockerfile, shared folder, ...)
    • Example: create_container.sh ubuntu nichuguen ../install_ubuntu
      • Creates a new ubuntu container.
      • The user nichuguen will be created and added to the sudoers
      • A new folder will be created in ../install_ubuntu. This folder will contain everything needed to deploy new containers (Dockerfile, docker-compose.yml), as well as a main/shared folder, which is mounted into $HOME/shared.
    • Note: For now, the only three valid parameters for container_name are:
      1. ubuntu
      2. kali
      3. hadoop1, see the README file in the hadoop1 folder
  • Once this script has been run, the container is ready and started.
  • Now you can launch GUI applications from your container's shell

Troubleshooting

  • If you see a "connection refused" error, you might have to use xhost + on the host computer so it accepts connections. (Needed for archlinux config)

MacOS

create_container.sh will install brew and socat. Socat will run on port 6000.

If you have the following error :

socat[16168] E bind(5, {LEN=0 AF=2 0.0.0.0:6000}, 16): Address already in use

close XQuartz and start create_container.sh again.

Warnings

Since the X11 is shared between the container and the host, the container has access to all the events fired in the host environment, including keypresses (so beware of what you're running).

docker_gui's People

Contributors

michaelcaraccio avatar nichuguen avatar ymaktepi avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.