Skip to content

Commit dfca752

Browse files
committed
chore: update docker docs
1 parent 8bfae08 commit dfca752

1 file changed

Lines changed: 32 additions & 13 deletions

File tree

README.md

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ And a scenario for using Verifiable Credential(s) For OID4VP flow:
6464
![OID4VP flow](http://www.plantuml.com/plantuml/proxy?cache=no&src=https://raw.githubusercontent.com/Sphereon-Opensource/OID4VC-demo/develop/documents/oid4vp-flow.puml)
6565

6666
# Step by Step instructions
67+
6768
In the next chapters we're going to show you how to setup the `agent` module, oid4vci-demo-front-end and a brief
6869
introduction on how credential branding actually works.
6970

@@ -72,45 +73,63 @@ introduction on how credential branding actually works.
7273
- [Credential Branding](./documents/credential-branding.md)
7374

7475
### Docker
76+
7577
We maintain Docker a setup for building and testing in directory `docker/compose/build`.
76-
We have created a script to install and patch the agent configurations for you required to build and run the Docker containers.
78+
We have created a script to install and patch the agent configurations for you required to build and run the Docker
79+
containers.
7780
It's located here: `docker/compose/build/install-configs.sh <ecosystem> <agent host address>`.
78-
The host address should be either a DNS host or a LAN IP that is reachable for your mobile devices running SSI wallet software. For example:
81+
**IMPORTANT:** The host address should be either a DNS host or a LAN IP that is reachable for your mobile devices running SSI wallet
82+
software. For example:
83+
7984
```bash
8085
install-configs.sh sphereon http://192.168.1.100:5000
8186
```
8287

83-
The install-configs.sh script will set up the environment for your containers using the env files contained in the directories under `docker/compose/build`:
88+
The install-configs.sh script will set up the environment for your containers using the .env.examples files from
89+
packages/**src/.env.example and put them in the directories under `docker/compose/build`:
90+
8491
```
8592
oid4vci-demo-frontend/.env.local
8693
oid4vp-demo-frontend/.env.local
8794
agent/.env.local
8895
```
89-
(The .env.local files are copied and patched from the packages/**/src/.env.example files)
9096

91-
Please ensure that you execute the script and docker compose commands with ./docker/compose/build as working directory and have correctly set up your environment
92-
variables as outlined in the documentation for [Setting up the agent](./documents/agent-setup.md) and [Setting up the VCI frontend](./documents/vci-front-end.md).
97+
(The .env.local files are copied and patched from the packages/**/src/.env.example files)
9398

94-
The current example for ecosystem "sphereon" loads the folder `packages/agent/conf/demos/sphereon` as your base configuration folder.
95-
All ecosystems present in packages/agent/conf/demos can be installed using the install-configs.sh script.
99+
Please ensure that you execute the script and docker compose commands with ./docker/compose/build as working directory
100+
and have correctly set up your environment
101+
variables as outlined in the documentation for [Setting up the agent](./documents/agent-setup.md)
102+
and [Setting up the VCI frontend](./documents/vci-front-end.md).
96103

104+
The current example for ecosystem "sphereon" loads the folder `packages/agent/conf/demos/sphereon` as your base
105+
configuration folder.
106+
All ecosystems present in packages/agent/conf/demos can be installed using the install-configs.sh script.
97107

98108
To build and run the Docker containers, execute the following commands from within the respective directory:
109+
99110
```bash
100111
docker compose build # This builds the Docker images
101112
docker compose up -d # This starts the Docker containers, this will require the .env & config files to be installed
102113
```
103-
The building process may take a few minutes. Once you execute the docker compose up command, three services will start: ssi-agent, oid4vci-demo-frontend, and oid4vp-frontend.
104114

105-
You should now be able to go to http://localhost:5001 and http://localhost:5002 respectively to test the issuer and verifier demo's.
115+
The building process may take a few minutes. Once you execute the docker compose up command, three services will start:
116+
ssi-agent, oid4vci-demo-frontend, and oid4vp-frontend.
117+
118+
You should now be able to go to http://localhost:5001 and http://localhost:5002 respectively to test the issuer and
119+
verifier demo's.
106120

107121
Please note that you might have to configure your docker environment to expose the host.docker.internal like the image
108-
below. If you cannot make that work you could adjust the config/docker and docker/compose/build/**/.env* files to suit your needs.
122+
below. If you cannot make that work you could adjust the config/docker and docker/compose/build/**/.env* files to suit
123+
your needs.
124+
<img src="resources/docker_settings.png" width="500" />
125+
126+
To build the images without docker-compose you can also just use "docker build" in the project root directory with some
127+
parameters:
109128

110-
To build the images without docker-compose you can also just use "docker build" in the project root directory with some parameters:
111129
```shell
112130
docker build -f ./docker/Dockerfile -t oid4vc-demo-ssi-agent:latest --build-arg="PACKAGE_PATH=packages/agent" --build-arg="NODE_SCRIPT=start:dev" .
113131
docker build -f ./docker/Dockerfile -t oid4vci-demo-frontend:latest --build-arg="PACKAGE_PATH=packages/oid4vci-demo-frontend" --build-arg="NODE_SCRIPT=start:prod" .
114132
docker build -f ./docker/Dockerfile -t oid4vp-demo-frontend:latest --build-arg="PACKAGE_PATH=packages/oid4vp-demo-frontend" --build-arg="NODE_SCRIPT=start:prod" .
115133
```
116-
<img src="resources/docker_settings.png" width="500" />
134+
135+

0 commit comments

Comments
 (0)