Docker记录
Docker sock
1 | curl -s --unix-socket /var/run/docker.sock http://image/json |
- Trying /var/run/docker.sock:0…
- Connected to docker (/Users/wurui/.docker/run/docker.sock) port 80 (#0)
GET /info HTTP/1.1
Host: docker
User-Agent: curl/7.79.1
Accept: / - Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Api-Version: 1.41
< Content-Type: application/json
< Date: Thu, 21 Jul 2022 09:55:25 GMT
< Docker-Experimental: false
< Ostype: linux
< Server: Docker/20.10.17 (linux)
< Transfer-Encoding: chunked
需要一个Host, /info前面不重要
1 | curl -s --unix-socket /var/run/docker.sock -vv docker/containers/json?all=true |
Docker
1 | docker run -it manjarolinux/base bash |
/etc/pacman.d/mirrorlist
1 | Server = https://mirrors.tuna.tsinghua.edu.cn/archlinuxarm/$arch/$repo |
/etc/pacman.conf
1 | Color |
/etc/locale.gen
1 | zh_CN.UTF-8 UTF-8 |
locale-gen
XQuartz
1 | brew install --cask xquartz |
OpenGL
Download and install latest XQuartz.
Enable Allow connections from network clients in X11 Preferences -> Security.
Add following line to file ~/.ssh/config.
1 | XAuthLocation /opt/X11/bin/xauth |
Enable indirect OpenGL rendering with X11 forwarding
1 | defaults write org.macosforge.xquartz.X11 enable_iglx -bool true |
Unfortunately, XQuartz only supports OpenGL 1.4.
Docker服务端的防护
http://shouce.jb51.net/docker_practice/security/daemon_sec.html
为了加强对服务端的保护,Docker 的 REST API(客户端用来跟服务端通信)在 0.5.2 之后使用本地的 Unix 套接字机制替代了原先绑定在 127.0.0.1 上的 TCP 套接字,因为后者容易遭受跨站脚本攻击。现在用户使用 Unix 权限检查来加强套接字的访问安全。
docker_api.lua
1 | /var/run/docker.pid --> 需要调整 |
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 WuRui!
评论