提交 fcee7cf7 编写于 作者: D Dan Hipschman

Add readme and build scripts

上级 26bfae9e
# Running the Example
1. Install Docker if you haven't already.
2. Run `./build_and_run.sh`
#!/bin/bash
./gen_certs.sh
DOCKER_BUILDKIT=1 docker build . -f marketplace/Dockerfile -t marketplace --secret id=ca.key,src=ca.key
DOCKER_BUILDKIT=1 docker build . -f recommendations/Dockerfile -t recommendations --secret id=ca.key,src=ca.key
docker-compose up
#!/bin/bash
# Generate CA key and self-signed cert
openssl req -x509 -nodes -newkey rsa:4096 -keyout ca.key -out ca.pem -subj /O=me
# Generate a private key and certificate signing request for the client and server
openssl req -nodes -newkey rsa:4096 -keyout client.key -out client.csr -subj /CN=marketplace
openssl req -nodes -newkey rsa:4096 -keyout server.key -out server.csr -subj /CN=recommendations
# Sign the client and server certs with the CA cert
openssl x509 -req -in client.csr -CA ca.pem -CAkey ca.key -set_serial 1 -out client.pem
openssl x509 -req -in server.csr -CA ca.pem -CAkey ca.key -set_serial 1 -out server.pem
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册