Skip to content

Instantly share code, notes, and snippets.

View yuefengkai's full-sized avatar
:atom:
I may be slow to respond.

Zengzhi Gao yuefengkai

:atom:
I may be slow to respond.
View GitHub Profile

Enable Docker Remote API with TLS client verification

Docker's Remote API can be secured via TLS and client certificate verification.
First of all you need a few certificates and keys:

  • CA certificate
  • Server certificate
  • Server key
  • Client certificate
  • Client key

Create certificate files

@yuefengkai
yuefengkai / SwitchHosts
Last active April 13, 2019 05:01
本地Hosts
127.0.0.1 gzz.cn
127.0.0.1 docker.gzz.cn
127.0.0.1 notice.gzz.cn
127.0.0.1 system.gzz.cn
127.0.0.1 teacher.gzz.cn
127.0.0.1 admin.gzz.cn
127.0.0.1 sso.gzz.cn
@yuefengkai
yuefengkai / GUID.cs
Created September 25, 2017 10:12
NewGuid
1 var uuid = Guid.NewGuid().ToString(); // 9af7f46a-ea52-4aa3-b8c3-9fd484c2af12
2
3 var uuidN = Guid.NewGuid().ToString("N"); // e0a953c3ee6040eaa9fae2b667060e09
4
5 var uuidD = Guid.NewGuid().ToString("D"); // 9af7f46a-ea52-4aa3-b8c3-9fd484c2af12
6
7 var uuidB = Guid.NewGuid().ToString("B"); // {734fd453-a4f8-4c5d-9c98-3fe2d7079760}
8
9 var uuidP = Guid.NewGuid().ToString("P"); // (ade24d16-db0f-40af-8794-1e08e2040df3)
10