github.com/tw-bc-group/fabric-ca@v2.0.0-alpha+incompatible/docker/examples/client-server-flow/README.md (about)

     1  # To build a docker image with fabric-ca
     2  ```sh
     3  $ cd /path/to/fabric-ca; make docker
     4  ```
     5  
     6  # Setup environment variables (optional)
     7  If you want to use your own defined certificates, be sure to save these
     8  certificates in the /var/hyperledger/fabric/.fabric-ca directory in your environment.
     9  Then set the following environment variables accordingly.
    10  
    11  ## Public key
    12  default value: ec.pem
    13  ```sh
    14  $ export CA_CERTIFICATE=<public key pem file>
    15  ```
    16  ## Private key
    17  default value: ec-key.pem
    18  ```sh
    19  $ export CA_KEY_CERTIFICATE=<private key pem file>
    20  ```
    21  ## Fabric CA configuration file
    22  This file contains users, database setup, groups, and signing information)
    23  sample values for server: server-config.json, server-psql.json
    24  sample values for client: client-config.json
    25  ```sh
    26  $ export FABRIC_CA_CONFIG=<Fabric CA configuration file>
    27  ```
    28  ## CSR (Certificate Signing Request) config file
    29  default value: csr.json
    30  ```sh
    31  $ export CSR_CONFIG=<CSR configuration file>
    32  ```
    33  
    34  # Certificate private and public files
    35  If you are using certificates or config files outside of the default values,
    36  be sure to save the desired files to the developer's local directories. The
    37  certificates should be saved to the `/var/hyperledger/fabric/.fabric-ca` directory
    38  and the config files should be saved to the `/var/hyperledger/fabric_ca_config`
    39  directory.
    40  
    41  You can also generate the certificates by running the following script that
    42  outputs server.pem and server-key.pem files and saves them to your $HOME/.fabric-ca
    43  directory.
    44  ```sh
    45  $ fabric-ca server init /path/to/fabric-ca/config/csr.json
    46  ```
    47  
    48  # To execute the fabric-ca server and fabric-ca clients
    49  ```sh
    50  $ docker-compose -f docker-compose-fabric-ca-cluster.yml up --force-recreate -d
    51  ```
    52  
    53  <a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
    54  s