Git Product home page Git Product logo

lfdisplay-dockerfile's Introduction

LFDisplay-Dockerfile

Option 1 (If you want to modify the dockerfile and build you own image)

  1. build the images based on the Dockerfile
docker build -t lipilian/lfdisplay:v0 .
  1. Check the image locally.
docker run -it lipilian/lfdisplay:v0
  1. Check the Ubuntu version and python version in container.
python --version
lsb_release -a
  1. Push the image to docker hub.
docker push lipilian/lfdisplay:v0
  1. Reverse Egnineer the dockfile after update the image by dfimage.
dfimage <images ID>

Option 2 you can pull my image

docker pull lipilian/lfdisplay:v0
  1. Copying the Cookie to connect X Server Displays.

On your local machine, get the cookie value using the following command

xauth list

Copy the output which would be of the form as shown below:

<username>/unix:  MIT-MAGIC-COOKIE-1  f1fa006c1e51fa8386209f85c57947c4
lipilian-Blade/unix:  MIT-MAGIC-COOKIE-1  aac799cc232afffe8df7ebc397a25c67
  1. Create container and mount current path to container with external display

Check your image ID

docker images

Based on your image ID, create your container

docker create -u root -it --name lf-display -v $(pwd):/home/lf-display/ --net=host -e DISPLAY -v /tmp/.X11-unix a85372ee1445 

Start the container and attach to it

docker start lf-display
docker attach lf-display
  1. Modify the container bash, add the cookie to the list In container bash

Note add 0 after the your unix:

xauth add lipilian-Blade/unix:0  MIT-MAGIC-COOKIE-1  aac799cc232afffe8df7ebc397a25c67
xauth list
  1. Try with firefox to test if the gui display installed successfully.

If firefox is not installed carefully, run

apt-get install firefox

lfdisplay-dockerfile's People

Contributors

lipilian avatar

Watchers

 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.