/safedock

Secure docker access daemon

Primary LanguageGo

- Testing 
  
  Do NOT use -it, -i or it. 

  curl -d "docker run --rm --memory=100m --cpus=0.1 -v=$PDX_HOME/dapps:/dapps/:ro --name=xzzz pdx-sandbox /bin/sh" -X POST http://localhost:41351

- Create self-signed certificate 

  openssl ecparam -genkey -name secp256k1 -out signer.key
  openssl req -new -sha256 -key signer.key -out signer.csr

	Country Name (2 letter code) [AU]:US
	State or Province Name (full name) [Some-State]:California
	Locality Name (eg, city) []:San Jose
	Organization Name (eg, company) [Internet Widgits Pty Ltd]:PDX Technologies, Inc.
	Organizational Unit Name (eg, section) []:Blockchain Hypercloud
	Common Name (e.g. server FQDN or YOUR name) []:signer.pdx.link
	Email Address []:jz@pdx.ltd

  openssl req -x509 -sha256 -days 3650 -key signer.key -in signer.csr -out signer.crt

- Sign & verify, see the img-signer/verify.sh for details

  ./img-signer.sh ./signer.key /home/jz/pdx-home/bin/images/pdx-chainstack-1.0.0.tgz /home/jz/pdx-home/bin/images/pdx-chainstack-1.0.0.tgz.sig

  ./img-verify.sh ./signer.crt /home/jz/pdx-home/bin/images/pdx-appsandbox-1.0.0.tgz /home/jz/pdx-home/bin/images/pdx-appsandbox-1.0.0.tgz.sig 
Verified OK

  ./img-loader.sh ./signer.crt $PDX_HOME/bin/images