The docker images provided in this repository target different use cases:
-
Used as FPC dev environment
Provides a complete development environment including Intel SGX compiler, etc... Useful to develop and test FPC locally without installing FPC dependencies on local dev machine. This refers to preferred option to getting started with FPC.
-
Used as CI environment
Based on FPC dev environment and used during Github CI.
-
Used as runtime environment for FPC components (FPC chaincode and ERCC)
Required to package, deploy, and run FPC chaincode.
FPC comes with the following docker images to build FPC components and the development environment.
All images start with hyperledger/fabric-private-chaincode-
prefix.
base-rt
: Base image for FPC. Includes all runtime dependencies including SGX runtime services.ccenv
: Chaincode environment image for FPC chaincodes based onbase-rt
.base-dev
: Base development image. Includes all build tools for FPC including protobuf, SGX SSL, SGX compiler, ...dev
: Development image based onbase-dev
. Add additional user-defined tools and development dependencies.
These images can be build manually (see Building images section) or pulled from ghcr.io/hyperledger/fabric-private-chaincode
(see Pulling images section).
-
make build
: creates base-rt, ccenv -
make build-dev
: creates base-rt, base-dev
-
make pull
: pulls ccenv -
make pull-dev
: pulls base-dev
Note that base-rt not pulled as it is an intermediate image included already as layer in ccenv
and base-dev
.
make run-dev
: creates dev (if not exist) and runs it. Does not create base-dev and base-rt, returns an error if not exists.
Option 1) Pull images and start dev container
cd utils/docker
make pull-dev
make run-dev
## continue inside docker
Option 2) Build images from scratch and start dev container
cd utils/docker
make build-dev
make run-dev
## continue inside docker
If no changes in utils/docker
cd utils/docker
make pull
make run-dev
## continue inside docker
otherwise
cd utils/docker
make build-dev
make run-dev
## continue inside docker
Pull images
cd utils/docker
make pull
or build them
cd utils/docker
make build
We publish images for every new release (docker tag = ${FPC_VERSION}
) and on PR merged (docker tag = main) through CI.
make publish
: pushing ccenv and base-dev to Github docker registry
When running the publish
target manually (not through CI), docker login on ghcr.io
is needed.
See documentation.
Use your github personal access token (PAT) to login.
export CR_PAT=YOUR_TOKEN
echo $CR_PAT | docker login ghcr.io -u USERNAME --password-stdin
Note that we only publish Ubuntu 20.04 LTS based images.
TODO describe automated publishing