2020年5月5日星期二

Docker Containers on the Desktop

https://blog.jessfraz.com/post/docker-containers-on-the-desktop/


1. Irssi

Best IRC client.
$ docker run -it \
    -v /etc/localtime:/etc/localtime \
    -v $HOME/.irssi:/home/user/.irssi \ # mounts irssi config in container
    --read-only \ # cool new feature in 1.5
    --name irssi \
    jess/irssi

2. Mutt

The text based email client that rules!
$ docker run -it \
    -v /etc/localtime:/etc/localtime \
    -e GMAIL -e GMAIL_NAME \ # pass env variables to config
    -e GMAIL_PASS -e GMAIL_FROM \
    -v $HOME/.gnupg:/home/user/.gnupg \ # so you can encrypt ;)
    --name mutt \
    jess/mutt

3. Rainbowstream

Awesome text based twitter client.
$ docker run -it \
    -v /etc/localtime:/etc/localtime \
    -v $HOME/.rainbow_oauth:/root/.rainbow_oauth \ # mount config files
    -v $HOME/.rainbow_config.json:/root/.rainbow_config.json \
    --name rainbowstream \
    jess/rainbowstream

4. Lynx

The browser everyone loves (to hate). but secretly I love
$ docker run -it \
    --name lynx \
    jess/lynx

GUIs

None of the images below use X11-Forwarding with ssh. Because why should you ever have to install ssh into a container? EWWW UNNECESSARY BLOAT!
The images work by mounting the X11 socket into the container! Yippeeeee!
The commands listed below are run on a linux machine. But Mac users, I have a special surprise for you. You can also do fun hacks with X11. Details are described here.
Note my patch was added for --device /dev/snd in Docker 1.8, before that you needed -v /dev/snd:/dev/snd --privileged.


5. Chrome

Pretty sure everyone knows what chrome is, but my image comes with flash and the google talk plugin so you can do hangouts.
$ docker run -it \
    --net host \ # may as well YOLO
    --cpuset-cpus 0 \ # control the cpu
    --memory 512mb \ # max memory it can use
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    -e DISPLAY=unix$DISPLAY \ # pass the display
    -v $HOME/Downloads:/root/Downloads \ # optional, but nice
    -v $HOME/.config/google-chrome/:/data \ # if you want to save state
    --device /dev/snd \ # so we have sound
    --name chrome \
    jess/chrome


6. Spotify

All the 90s hits you ever wanted and more.
$ docker run -it \
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    -e DISPLAY=unix$DISPLAY \ # pass the display
    --device /dev/snd \ # sound
    --name spotify \
    jess/spotify

7. Gparted

Partition your device in a container.
MIND BLOWN.
$ docker run -it \
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    -e DISPLAY=unix$DISPLAY \ # pass the display
    --device /dev/sda:/dev/sda \ # mount the device to partition
    --name gparted \
    jess/gparted

8. Skype

The other video conferencer. This relies on running pulseaudio also in a container.
# start pulseaudio
$ docker run -d \
    -v /etc/localtime:/etc/localtime \
    -p 4713:4713 \ # expose the port
    --device /dev/snd \ # sound
    --name pulseaudio \
    jess/pulseaudio
# start skype
$ docker run -it \
    -v /etc/localtime:/etc/localtime \
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    -e DISPLAY=unix$DISPLAY \ # pass the display
    --device /dev/snd \ # sound
    --link pulseaudio:pulseaudio \ # link pulseaudio
    -e PULSE_SERVER=pulseaudio \
    --device /dev/video0 \ # video
    --name skype \
    jess/skype


9. Tor Browser

Because Tor, duh!
$ docker run -it \
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    -e DISPLAY=unix$DISPLAY \ # pass the display
    --device /dev/snd \ # sound
    --name tor-browser \
    jess/tor-browser


10. Cathode

That super old school terminal.
$ docker run -it \
    -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
    -e DISPLAY=unix$DISPLAY \ # pass the display
    --name cathode \
    jess/1995








没有评论:

发表评论

youtube的dns屏蔽方法

  216.239.38.120 是 Google 提供的一个特殊 DNS 服务器,用于强制开启 YouTube 受限模式(Restricted Mode) 。 如果你想在家里强制 YouTube 进入受限模式,可以在 路由器的 DNS 设置 中配置以下 DNS 服务器: D...