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
| function createPhoneNumber(numbers){ | |
| return "(" + numbers.slice(0,3).join('') + ")" + " " + numbers.slice(3,6).join('') + "-" + numbers.slice(6).join('') | |
| } |
This is how to connect to another host with your docker client, without modifying your local Docker installation or when you don't have a local Docker installation.
First be sure to enable the Docker Remote API on the remote host.
This can easily be done with a container.
For HTTP connection use jarkt/docker-remote-api.
| const express = require('express'); | |
| const morgan = require('morgan'); | |
| const cors = require('cors'); | |
| const app = express(); | |
| app.use(morgan('dev')); | |
| app.use(cors()); | |
| app.get('/', (req, res) => { |