Giter VIP home page Giter VIP logo

tl-docker's Introduction

ThinLinc Demo Instance

This is a docker based instance of ThinLinc. Running under docker its default behavior is to suffer from complete amnesia after each restart. As such it requires some minimal configuration after startup to accept your logins.

Startup

First you have to install docker. If you are running ubuntu, docker will be available as a package for installation. If you are on windows or macos you can go to docker.com to download docker for your os. If you are on RedHat, install podman-docker to get a docker compatible cli for podman.

Normally a docker image will run a single application. Often only a single process. In order to demo ThinLinc we get docker to run an entire linux system for us. For this to work, docker needs to run in --privileged mode.

The ThinLinc client uses ssh to communicate with its server, with the --publish option you map the ssh port of the ThinLinc demo server to a port, accessible from the outside. Keep the docker attached to the terminal -t to see all the messages it outputs to the console.

docker run --privileged --name my-tl-demo --publish 9922:22 -t oposs/tl-ubuntu

Pro Tip If you feel uneasy about giving the ThinLinc docker image full system access using the --privileged option you can also use the following commandline to start.

docker run -v /sys/fs/cgroup/:/sys/fs/cgroup:ro \
  --tmpfs /run --tmpfs /run/lock \
  --cap-add SYS_PTRACE --cap-add SYS_ADMIN \
  --name my-tl-demo --publish 9922:22 -t \
  oposs/tl-ubuntu

Configuration

Before you can login, the ThinLinc server requires some minimal configuration

First add a user account

docker exec my-tl-demo tlcfg add-user myuser mypassword

Second, let the ThinLinc server know under what hostname it is reachable from the client. This is a very important step, as ThinLinc uses a load-balancing system where it will tell your client to connect to the the ThinLinc server with the lowest load in your ThinLinc cluster.

In this example we tell the ThinLinc server that it can be reached from the local machine. But you can also set the public IP or the dns name of your machine to make your demo instance available on your network.

docker exec my-tl-demo tlcfg set-hostname 127.0.0.1

Now all is ready for accessing the ThinLinc server using the ThinLinc client. Make sure to configure the ThinLinc client to use the right port number.

If you have not yet downloaded a ThinLinc client, you can download it here.

Cleanup

When you are done testing, you can get rid of your ThinLinc demo server very easily:

docker kill my-tl-demo
docker rm my-tl-demo

Note that this will also get rid of anything you have done on the ThinLinc demo server while logged in with your demo user

Debugging

If you want to have a peak inside the ThinLinc server while it is running, try this

docker exec -ti my-tl-demo bash

Build

If you want to tinker with thinlinc, and modify it ... fork this repo and let me have a pull request. To get started, use the following command to rebuild the docker image locally.

docker build --tag tl-ubuntu:latest .

EOF

tl-docker's People

Contributors

oetiker avatar moetiker 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.