Skip to content

Instantly share code, notes, and snippets.

docker add label pki.dns to all nodes

This command sets the pki.dns label = to uc-<IP ADDRESS>.vcloud.w.com, where <IP ADDRESS> is the ip address with octets seperated by dashes - instead of period .

docker node ls --format '{{.ID}}' | \
xargs docker node inspect $1  \
   --format 'docker node update --label-add pki.dns=uc-{{join (split .Status.Addr ".") "-" }}.vcloud.w.com {{.ID}}' | sh
@rbdiang
rbdiang / Java From Docker
Last active April 19, 2018 17:33
java without java
```bash
mkdir ~/bin
cat >> ~/bin/docker-java << "BINGOBANGO"
#! /bin/env bash
if [ "$PWD" = "/" ]; then
echo "
ERROR:
docker-java cannot be executed from $PWD
@rbdiang
rbdiang / ssl-files.md
Last active January 19, 2018 11:41
Working with ssl files

p12 file from rsa.key and server.crt

verify file contents:

../private/imac.yantz5.key.pem

head -10 ../private/imac.yantz5.key.pem
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-256-CBC,25AD524E722FC26BF558B1717CDEE602

+9WhhvN5yu9LJD++PSFVv9XGpa0qVl+PTjvRQVdf/h7kJEULcAkGtJ6DTpD179k+
@rbdiang
rbdiang / portainer-tls.yml
Created January 13, 2018 23:29
A docker-compose file that deploys portainer service as a stack on a mac.
# Make sure user has read permission on docker sock
# sudo chmod o+r /var/run/docker.sock
#
version: "3.3"
services:
portainer:
image: portainer/portainer
ports:
- 8443:9000
command: