docker / cli

The Docker CLI
Apache License 2.0
4.94k stars 1.93k forks source link

please create official docker full os #4246

Closed realsifocopypaste333 closed 1 year ago

realsifocopypaste333 commented 1 year ago

Description

please create official docker full os

we need official docker full os for very simple simple cloud computing / cloud gaming

thanks

=========

i create create very simple docker full os buat it needs very complex steps

  1. install gnu linux for host os ex= debian stable

============

  1. install docker in host os

sudo apt install docker docker-compose

============

  1. pull docker gnu linux os for docker linux os

ex= kali linux rolling

sudo docker pull kalilinux/kali-rolling

==============

  1. make audio fix (pulse audio fix) before start the dcoker image

a. create file named pulseaudio.socket in /home/user/pulse

b. in that file write this text and save

default-server = unix://home/user/pulse/pulseaudio.socket

Prevent a server running in the container

autospawn = no daemon-binary = /bin/true

Prevent the use of shared memory

enable-shm = false Share socket and config file with docker and set environment variables PULSE_SERVER and PULSE_COOKIE. Container user must be same as on host:

c. run this comman in terminal

pactl load-module module-native-protocol-unix socket=/home/user/pulse/pulseaudio.socket

=============

  1. run the docker image with

a. check the docker image that we pull

sudo docker images

b. run it with this commmand

docker run -ti --device=/dev/dri:/dev/dri --privileged --cap-add=ALL --device /dev/snd --volume /dev:/dev -v /dev:/dev --group-add audio -v /var/run/docker.sock:/host/var/run/doc -v /:/media/prime --env PULSE_SERVER=unix:/home/user/pulse/pulseaudio.socket --env PULSE_COOKIE=/home/user/pulse/pulseaudio.cookie --volume /home/user/pulse/pulseaudio.socket:/home/user/pulse/pulseaudio.socket --volume /home/user/pulse/pulseaudio.client.conf --publish=0.0.0.0:3351:3351 --publish=0.0.0.0:51:51 --group-add video --volume="/tmp/.X11-unix:/tmp/.X11-unix" --env="DISPLAY" -e XAUTHORITY=/root/.Xauthority --name dockerfullos-001 imageid

c. and the kali linux docker bash terminal with appears

================

  1. install apps that we need

a. apt update

b. apt full-upgrade -y

c. apt install nano pulseaudio neofetch vlc smplayer wget uget cairo-dock alsa-utils network-manager net-tools cairo-dock-plug-ins dbus dbus-x11 thunar chromium rofi terminator sudo kate kwrite geany geany-plugin-addons aptitude qt5-style-kvantum-themes qt5-style-kvantum-l10n qt5-style-kvantum libreoffice krita gimp kdenlive handbrake yt-dlp isomaster k3b apt-utils git htop compiz compiz-boxmenu compiz-plugins compizconfig-settings-manager emerald emerald-themes fusion-icon simple-ccsm usbutils lxqt bleachbit nmap xrpd openssh-server openssh-client -y


for intel gpu

a. dpkg --add-architecture i386 && sudo apt update

b. apt install libvulkan1 libvulkan1:i386 mesa-vulkan-drivers mesa-vulkan-drivers:i386 vulkan-tools* -y

c. apt install wine64 lutris*


===============

  1. add root password

passwd

===================

  1. add user

adduser username

usermod -aG sudo username

========================

  1. to save the container into image

a. open new terminal

b. check the container id

sudo docker ps -a

c. save the container into docker image

sudo docker container commit --pause=false id-container nama-image:label

example

sudo docker container commit --pause=false c092aa5afec0 kali-linux:kali-linux-docker-full-os

================

it is very complex steps and needs long time :)

so please make official full os for us .thanks :)

===============

simple use case for docker full os

A. docker full os can make better gaming expirence

because docker full os kali linux rolling (debian testing) have newer mesa driver than debian stable , so it make game in docker full os better

the step are

  1. run the ali-linux-docker-full-os

sudo docker run -ti --device=/dev/dri:/dev/dri --privileged --cap-add=ALL --device /dev/snd --volume /dev:/dev -v /dev:/dev --group-add audio -v /var/run/docker.sock:/host/var/run/doc -v /:/media/prime --env PULSE_SERVER=unix:/home/user/pulse/pulseaudio.socket --env PULSE_COOKIE=/home/user/pulse/pulseaudio.cookie --volume /home/user/pulse/pulseaudio.socket:/home/user/pulse/pulseaudio.socket --volume /home/user/pulse/pulseaudio.client.conf --publish=0.0.0.0:3351:3351 --publish=0.0.0.0:51:51 --group-add video --volume="/tmp/.X11-unix:/tmp/.X11-unix" --env="DISPLAY" -e XAUTHORITY=/root/.Xauthority --name dockerfullos-001 imageid

  1. tipe lutris

  2. lutris will run in host os

  3. setting the lutris and play the game :)

==================

c. docker full os can sutitude the vm

because docker full os is a native os like chroot so it has a native performanc like the host

how to do it ?

it very imple

method A

acces all docker full os apps fro host

  1. run the immage

sudo docker run -ti --device=/dev/dri:/dev/dri --privileged --cap-add=ALL --device /dev/snd --volume /dev:/dev -v /dev:/dev --group-add audio -v /var/run/docker.sock:/host/var/run/doc -v /:/media/prime --env PULSE_SERVER=unix:/home/user/pulse/pulseaudio.socket --env PULSE_COOKIE=/home/user/pulse/pulseaudio.cookie --volume /home/user/pulse/pulseaudio.socket:/home/user/pulse/pulseaudio.socket --volume /home/user/pulse/pulseaudio.client.conf --publish=0.0.0.0:3351:3351 --publish=0.0.0.0:51:51 --group-add video --volume="/tmp/.X11-unix:/tmp/.X11-unix" --env="DISPLAY" -e XAUTHORITY=/root/.Xauthority --name dockerfullos-001 imageid

  1. we can use rofi or cairo-dock to lunch the docker full os apps

using rofi

  1. type rofi --show run

  2. select the apps

ex =vlc

  1. vlc docker full os apps with run directly the host os

  2. play some move / videos / audio with that vlc :)


using cairo-dock

  1. type cairo-dock

  2. cairo-dcok will launch to host os

  3. launch docker full os apps fro cairo-dock menu :)


=========

method B

using xrpd

we can access full gui of docker full os via xrdp

how to do it

  1. run the docker image

sudo docker run -ti --device=/dev/dri:/dev/dri --privileged --cap-add=ALL --device /dev/snd --volume /dev:/dev -v /dev:/dev --group-add audio -v /var/run/docker.sock:/host/var/run/doc -v /:/media/prime --env PULSE_SERVER=unix:/home/user/pulse/pulseaudio.socket --env PULSE_COOKIE=/home/user/pulse/pulseaudio.cookie --volume /home/user/pulse/pulseaudio.socket:/home/user/pulse/pulseaudio.socket --volume /home/user/pulse/pulseaudio.client.conf --publish=0.0.0.0:3351:3351 --publish=0.0.0.0:51:51 --group-add video --volume="/tmp/.X11-unix:/tmp/.X11-unix" --env="DISPLAY" -e XAUTHORITY=/root/.Xauthority --name dockerfullos-001 imageid

  1. edit the xrpd config in that docker full os

nano /etc/xrdp/xrdp.ini

change to port to the open port 3351

it will make the xrdp ip 127.0.0.1:3351

  1. restart xrdp server

service xrdp restart

  1. install kdrc (rdp client) in host os

  2. conect the xrdp using kdrc with the xrpd ip


krdc setting

a. screen setting = 1024x800

b. audio = in this omputer --- pulse audio

c 32bit color :)


  1. enjoy :) we can use docker full os with full gui in krdc :)

=====================

C. docker full os can use for simple cloud computing / cloud gaming

how to do it ?

it very easy

  1. run the docker image

we can run multiple docker full image in single server

a. terminal 1

sudo docker run -ti --device=/dev/dri:/dev/dri --privileged --cap-add=ALL --device /dev/snd --volume /dev:/dev -v /dev:/dev --group-add audio -v /var/run/docker.sock:/host/var/run/doc -v /:/media/prime --env PULSE_SERVER=unix:/home/user/pulse/pulseaudio.socket --env PULSE_COOKIE=/home/user/pulse/pulseaudio.cookie --volume /home/user/pulse/pulseaudio.socket:/home/user/pulse/pulseaudio.socket --volume /home/user/pulse/pulseaudio.client.conf --publish=0.0.0.0:3351:3351 --publish=0.0.0.0:51:51 --group-add video --volume="/tmp/.X11-unix:/tmp/.X11-unix" --env="DISPLAY" -e XAUTHORITY=/root/.Xauthority --name dockerfullos-001 imageid

change xrdp and ssh port accordingly :)


how to change ssh port

  1. nano /etc/ssh/sshd_config

  2. change the port to 51



b. terminal 2

sudo docker run -ti --device=/dev/dri:/dev/dri --privileged --cap-add=ALL --device /dev/snd --volume /dev:/dev -v /dev:/dev --group-add audio -v /var/run/docker.sock:/host/var/run/doc -v /:/media/prime --env PULSE_SERVER=unix:/home/user/pulse/pulseaudio.socket --env PULSE_COOKIE=/home/user/pulse/pulseaudio.cookie --volume /home/user/pulse/pulseaudio.socket:/home/user/pulse/pulseaudio.socket --volume /home/user/pulse/pulseaudio.client.conf --publish=0.0.0.0:3352:3352 --publish=0.0.0.0:52:52 --group-add video --volume="/tmp/.X11-unix:/tmp/.X11-unix" --env="DISPLAY" -e XAUTHORITY=/root/.Xauthority --name dockerfullos-002 imageid

change xrdp and ssh port accordingly :)


c. terminal 3

sudo docker run -ti --device=/dev/dri:/dev/dri --privileged --cap-add=ALL --device /dev/snd --volume /dev:/dev -v /dev:/dev --group-add audio -v /var/run/docker.sock:/host/var/run/doc -v /:/media/prime --env PULSE_SERVER=unix:/home/user/pulse/pulseaudio.socket --env PULSE_COOKIE=/home/user/pulse/pulseaudio.cookie --volume /home/user/pulse/pulseaudio.socket:/home/user/pulse/pulseaudio.socket --volume /home/user/pulse/pulseaudio.client.conf --publish=0.0.0.0:3353:3353 --publish=0.0.0.0:53:53 --group-add video --volume="/tmp/.X11-unix:/tmp/.X11-unix" --env="DISPLAY" -e XAUTHORITY=/root/.Xauthority --name dockerfullos-002 imageid

change xrdp and ssh port accordingly :)


each docker full os will run natively and independenly


  1. we can acces it from the ost os with ip localhost:xrdp post (127.0.0.1:3351) with kdrc client :)

  2. we can also accest in from diffierent gnu linux computer in the same lan / wifi local network with the ip from host os that give by the router explampe 192.168.43.1 etc and xrdp port :) with kdrc

exaample xrdp

dockerfullos-001 = 192.168.43.1:3351

dockerfullos-002 = 192.168.43.1:3352

dockerfullos-003 = 192.168.43.1:3353

example of ssh

dockerfullos-001 = 192.168.43.1:51

dockerfullos-002 = 192.168.43.1:52

dockerfullos-003 = 192.168.43.1:53

===========

  1. enjoy the docker full os for cloud computing :)

all the apps fro docker full os will run natively in kdrc in the client compuputer :)

  1. for gaming

we can use emulator (ps1, ps2, psp, mame etc) , steam , lutris, wine etc :)


wine /lutris fix

wine / lutris sometime will error in docker full os

how to fix it

  1. open lutris

  2. setting the game with lutris

  3. in the game menu , select wine regristry

  4. edit the hcu -------> wine

  5. add key X11 DRIVER

  6. add string "UseXVidMode"="N"

  7. add string UseXVidMode -------> edit the VALUE to N

  8. close wine

==================

thanks :)

===================

wildybytes commented 1 year ago

di luar nalar njirr

fanchann commented 1 year ago

What would you do with a full os docker? in general, docker only runs one service.

Hazmi35 commented 1 year ago

I'm not even sure what he meant by "full os"

binsarjr commented 1 year ago

try to detail separately first what you really want. why should it be implemented? don't mix it up with a tutorial that everyone doesn't know what it means. and use formatting so its easy to read

G33kNoob commented 1 year ago

Baka

HaradaKumiko commented 1 year ago

pak tolong dungunya di grup aja, jangan disini

WaxArsatia commented 1 year ago

Afaik container should be "do one job and do it well" A container should have only one mission, A container should minimize application dependencies, this is part of container philosophy, as your description, that will likely suitable for vm, you can create vm template or anything else kind for that purpose

abdul-royyaq commented 1 year ago

hey hey you are too foolish, all you need is to create a docker image and put it on docker hub

irdaislakhuafa commented 1 year ago

@realsifocopypaste333 this is funniest issue i've ever seen, you just need to create the docker image you want and push it to docker hub. if you complain "i have do very complex step" you just need to make a shell script for it, write once and run whenever you want. even though it totally goes against the docker principle of "creating a system focused on developing a single app" not OS. i think FLOSS philosophy fanatics like you who think other than FLOSS is wrong will respect other philosophies but it's not

RushingAlien commented 1 year ago

sounds a lot like running something distrobox covers already

fajarrasyid commented 1 year ago

go internasional coyy

sgnd commented 1 year ago

Hey there!

If you're looking to use Docker with a "full os", you can use an Ubuntu base image and read about Cloud-init.

Cloud-init provides a lot of configuration options, so make sure to check out the documentation at https://cloudinit.readthedocs.io/en/latest/ to learn more about how to use it.

I hope this helps! Let me know if you have any questions.

lc-at commented 1 year ago

Ada-ada saja. Keren Pak Anton.

aarzaary commented 1 year ago

Please close this stupid issue 🥲

cpuguy83 commented 1 year ago

I've gone ahead and closed and locked the discussion.

You can build an OS to run in a container if you like. There are also runtimes you can use to encapsulate a container in a VM (kata containers, e.g.)