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
$ uname -r
| // usage: {{ file.size | prettyBytes }} | |
| Vue.filter('prettyBytes', function (num) { | |
| // jacked from: https://github.com/sindresorhus/pretty-bytes | |
| if (typeof num !== 'number' || isNaN(num)) { | |
| throw new TypeError('Expected a number'); | |
| } | |
| var exponent; | |
| var unit; | |
| var neg = num < 0; |
| OLD stuff. This was not enough for an A+ anymore. |
| CREATE USER 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD'; | |
| GRANT USAGE ON * . * TO 'DB_USERNAME'@'localhost' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0 ; | |
| CREATE DATABASE IF NOT EXISTS `DB_USERNAME` ; | |
| GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'localhost'; | |
| #For connection from everywhere | |
| GRANT USAGE ON * . * TO 'DB_USERNAME'@'%' IDENTIFIED BY 'DB_PASSWORD' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 | |
| GRANT ALL PRIVILEGES ON `DB_USERNAME` . * TO 'DB_USERNAME'@'%'; |
| /* | |
| Super-simple Mustache-style text-replacement. | |
| Example: | |
| var data = {name: "James", location: "Mars"}; | |
| mustache("Welcome to {{location}}, {{ name }}.", data); // => Welcome to Mars, James. | |
| */ | |
| function mustache(string, data){ |