Skip to content

Commit 58470bf

Browse files
committed
chore: upgrade docker compose to v2
Signed-off-by: Sandeep Nishad <[email protected]>
1 parent b88befb commit 58470bf

File tree

21 files changed

+48
-48
lines changed

21 files changed

+48
-48
lines changed

core/drivers/corda-driver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ To push image to github container registry:
133133
* Create a Personal Access Token with read packages access in github. Refer [Creating a Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) for help.
134134
* Run `docker login ghcr.io` and use your github username and personal access token as password.
135135
* Run: `make deploy`.
136-
* To stop, run: `docker-compose down`
136+
* To stop, run: `docker compose down`
137137

138138
## Documentation
139139

core/drivers/corda-driver/makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ run:
5252

5353
.PHONY: deploy
5454
deploy:
55-
docker-compose $(COMPOSE_ARG) up -d
55+
docker compose $(COMPOSE_ARG) up -d
5656

5757
.PHONY: stop
5858
stop:
59-
docker-compose $(COMPOSE_ARG) down
59+
docker compose $(COMPOSE_ARG) down
6060

6161
.PHONY: clean
6262
clean:

core/drivers/fabric-driver/makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ push-image-latest:
6161

6262
deploy:
6363
mkdir -p wallet-$(NETWORK_NAME) && chmod 777 wallet-$(NETWORK_NAME)
64-
docker-compose $(COMPOSE_ARG) up -d
64+
docker compose $(COMPOSE_ARG) up -d
6565

6666
stop:
67-
docker-compose $(COMPOSE_ARG) down
67+
docker compose $(COMPOSE_ARG) down
6868

6969
re-deploy: stop deploy
7070

core/drivers/fabric-driver/readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Note: Can also be run in mocked mode by setting environment variable `MOCK=true`
5555

5656
Make sure the env and config file have the expected values.
5757

58-
Update the docker-compose with the correct external network and ports exposed
58+
Update the docker compose with the correct external network and ports exposed
5959

6060
To do a full build run `make build-image`. This update/clones protos, generates js protos and compiles typescript.
6161

@@ -67,8 +67,8 @@ To deploy, run `make deploy`
6767
* Run `docker login ghcr.io` and use your github username and personal access token as password.
6868
* Copy `.env.docker.template` to `.env` and make changes appropriately (like correcting the base path of repo, changing network name if required etc, check image details here: [weaver-fabric-driver](https://github.com/hyperledger-labs/weaver-dlt-interoperability/pkgs/container/weaver-fabric-driver)).
6969
* Make sure connection profile used for docker, containers correct hostnames instead of localhost in urls.
70-
* If deploying more than one driver on same host, make sure to change service name in docker-compose to avoid conflicts.
71-
* Finally run `docker-compose up -d` to deploy the fabric driver.
70+
* If deploying more than one driver on same host, make sure to change service name in docker compose to avoid conflicts.
71+
* Finally run `docker compose up -d` to deploy the fabric driver.
7272

7373

7474
### TL/MP Environment

core/identity-management/iin-agent/makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,10 @@ push-image-latest:
6363
deploy:
6464
chmod 777 $(DLT_SPECIFIC_DIR)
6565
docker network create iin || true
66-
docker-compose $(COMPOSE_ARG) up -d
66+
docker compose $(COMPOSE_ARG) up -d
6767

6868
stop:
69-
docker-compose $(COMPOSE_ARG) down
69+
docker compose $(COMPOSE_ARG) down
7070

7171
re-deploy: stop deploy
7272

core/relay/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ pushi-images: push-server push-client push-driver push-allinone
155155
.PHONY: start
156156
start:
157157
docker network create relay || true
158-
docker-compose $(COMPOSE_ARG) up -d
158+
docker compose $(COMPOSE_ARG) up -d
159159
# Starts an instance of the relay container.
160160
#
161161
.PHONY: start-server
162162
start-server:
163163
docker network create relay || true
164-
docker-compose $(COMPOSE_ARG) up -d relay-server
164+
docker compose $(COMPOSE_ARG) up -d relay-server
165165

166166
.PHONY: stop
167167
stop:
168-
docker-compose $(COMPOSE_ARG) down
168+
docker compose $(COMPOSE_ARG) down
169169

170170
.PHONY: convert-compose-method1
171171
convert-compose-method1:
@@ -182,7 +182,7 @@ clean:
182182
@echo -e "\033[1mCLEAN\033[0m - Removing all artifacts..."
183183
-rm -rf protos-rs
184184
-rm fingerprint.json
185-
-docker-compose down
185+
-docker compose down
186186
-docker rmi $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_SERVER)
187187
-docker rmi $(DOCKER_IMAGE_SERVER)
188188
-docker rmi $(DOCKER_REGISTRY)/$(DOCKER_IMAGE_CLIENT)

core/relay/relay-docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ First **login** to github container registry:
149149
* Create a Personal Access Token with read packages access in github. Refer [Creating a Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token) for help.
150150
* Run `docker login ghcr.io` and use your github username and personal access token as password.
151151

152-
**Some sample steps to deploy relay using docker-compose when Config File is available:**
152+
**Some sample steps to deploy relay using docker compose when Config File is available:**
153153

154154
* Copy `.env.template` file to `.env`.
155155
* Keep following Environment Variables in `.env` and delete/ignore rest:
@@ -162,10 +162,10 @@ First **login** to github container registry:
162162
* Tip: If running all relays on same host, make sure to change service name before each relay deployment, to avoid conflict in names.
163163
* Run `make convert-compose-method1`.
164164
* Create docker network named `relay`: `docker network create relay`.
165-
* To deploy relay, run: `docker-compose up relay-server -d` (Given relay-server is the service name in docker-compose).
165+
* To deploy relay, run: `docker compose up relay-server -d` (Given relay-server is the service name in docker-compose).
166166
* Also `make start-server` does the above 2 steps, if service name is not changed.
167167

168-
**Some sample steps to deploy relay using docker-compose when Config is not available:**
168+
**Some sample steps to deploy relay using docker compose when Config is not available:**
169169

170170
* Copy `.env.template.2` file to `.env`.
171171
* Configure the following environment variables in `.env` and delete (or ignore) the rest:
@@ -197,7 +197,7 @@ First **login** to github container registry:
197197
* Run `make convert-compose-method2`.
198198
* Tip: If running all relays on same host, make sure to change service name before each relay deployment, to avoid conflict in names.
199199
* Create docker network named `relay`: `docker network create relay`.
200-
* To deploy relay, run: `docker-compose up relay-server -d` (Given relay-server is the service name in docker-compose).
200+
* To deploy relay, run: `docker compose up relay-server -d` (Given relay-server is the service name in docker-compose).
201201
* Also `make start-server` does the above 2 steps, if service name is not changed.
202202

203203
## Push Relay image to Github container registry

docs/docs/external/getting-started/enabling-weaver-network/corda.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d
512512
513513
To start the relay server, navigate to the folder containing the above files and run the following:
514514
```bash
515-
docker-compose up -d relay-server
515+
docker compose up -d relay-server
516516
```
517517
518518
#### Launch Driver
@@ -545,13 +545,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d
545545
- **Enabling TLS**:
546546
- You can make your driver accept TLS connections by specifying `DRIVER_TLS` as `true` and specifying a TLS certificate file path and private key file path in `DRIVER_TLS_CERT_PATH` and `DRIVER_TLS_KEY_PATH` respectively. The same certificate should be specified in this driver's definition in the `drivers` section in the `config.toml` file of your relay in the `tlsca_cert_path` property (see the earlier section on relay configuration).
547547
- To communicate with your network' relay using TLS (i.e., if the relay is TLS-enabled), specify that relay's TLS CA certificate path in `RELAY_TLSCA_CERT_PATH` (currently only one certificate can be configured) and set `RELAY_TLS` to `true`. This CA certificate should match the one specified in the `cert_path` property in the relay's `config.toml` file (see the earlier section on relay configuration):
548-
- You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/corda-driver/credentials` folder in the Fabric Driver container as specified in the [docker-compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables.
548+
- You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/corda-driver/credentials` folder in the Fabric Driver container as specified in the [docker compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables.
549549
550550
- `docker-compose.yaml`: This specifies the properties of the driver container. You can use the [file in the repository](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/corda-driver/docker-compose.yml) verbatim.
551551
552552
To start the driver, navigate to the folder containing the above files and run the following:
553553
```bash
554-
docker-compose up -d
554+
docker compose up -d
555555
```
556556
557557
#### Vault Initialization

docs/docs/external/getting-started/enabling-weaver-network/fabric.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,7 +603,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d
603603

604604
To start the relay server, navigate to the folder containing the above files and run the following:
605605
```bash
606-
docker-compose up -d relay-server
606+
docker compose up -d relay-server
607607
```
608608

609609
#### Launch Driver
@@ -639,7 +639,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d
639639
- **Enabling TLS**:
640640
- You can make your driver accept TLS connections by specifying `DRIVER_TLS` as `true` and specifying a TLS certificate file path and private key file path in `DRIVER_TLS_CERT_PATH` and `DRIVER_TLS_KEY_PATH` respectively. The same certificate should be specified in this driver's definition in the `drivers` section in the `config.toml` file of your relay in the `tlsca_cert_path` property (see the earlier section on relay configuration).
641641
- To communicate with your network' relay using TLS (i.e., if the relay is TLS-enabled), specify that relay's TLS CA certificate path in `RELAY_TLSCA_CERT_PATH` (currently only one certificate can be configured) and set `RELAY_TLS` to `true`. This CA certificate should match the one specified in the `cert_path` property in the relay's `config.toml` file (see the earlier section on relay configuration):
642-
- You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/fabric-driver/credentials` folder in the Fabric Driver container as specified in the [docker-compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables.
642+
- You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/fabric-driver/credentials` folder in the Fabric Driver container as specified in the [docker compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/drivers/fabric-driver/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `DRIVER_TLS_CERT_PATH`, `DRIVER_TLS_KEY_PATH`, and `RELAY_TLSCA_CERT_PATH` variables.
643643

644644
- `config.json`: This contains settings used to connect to a CA of a Fabric network organization and enroll a client. A sample is given below:
645645
```json
@@ -661,7 +661,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d
661661
- As in the `.env` configuration, you should pick an organization for the driver to associate with. The `admin` section specifies the registrar name and password (this should be familiar to any Fabric network administrator) used to enroll clients. Default values of `admin` and `adminpw` are specified above as examples, which you should replace with the right values configured in your network organization's CA.
662662
- `<affiliation>` should be what's specified in your organization's Fabric CA server configuration. The default is `org1.department1`, but you should look up the appropriate value from the CA server's configuration file.
663663
- `<msp-id>` should be set to the (or an) MSP ID of the selected organization.
664-
- `<ca-service-endpoint>` should be set to the CA server's endpoint. If you launched your CA server as a container from a docker-compose file, this should be set to the container's service name.
664+
- `<ca-service-endpoint>` should be set to the CA server's endpoint. If you launched your CA server as a container from a docker compose file, this should be set to the container's service name.
665665

666666
| Notes |
667667
|:------|
@@ -671,7 +671,7 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d
671671

672672
To start the driver, navigate to the folder containing the above files and run the following:
673673
```bash
674-
docker-compose up -d
674+
docker compose up -d
675675
```
676676

677677
#### Launch IIN Agents
@@ -778,13 +778,13 @@ Weaver provides a [pre-built image](https://github.com/hyperledger-labs/weaver-d
778778
- `EXTERNAL_NETWORK`: Set to the network [name](https://docs.docker.com/compose/networking/) of your Fabric network.
779779
- **Enabling TLS**:
780780
- Make your IIN Agent accept TLS connections by specifying `IIN_AGENT_TLS` as `true` and specifying a TLS certificate file path and private key file path in `IIN_AGENT_TLS_CERT_PATH` and `IIN_AGENT_TLS_KEY_PATH` respectively. The same certificate should be specified in this agent's JSON object in another agent's `dnsconfig.json` file under the appropriate security domain and IIN Agent ID scope.
781-
- You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/opt/iinagent/credentials` folder in the IIN Agent container as specified in the [docker-compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/identity-management/iin-agent/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `IIN_AGENT_TLS_CERT_PATH` and `IIN_AGENT_TLS_KEY_PATH` variables respectively.
781+
- You can point to the folder in your host system containing the certificate and key using the `TLS_CREDENTIALS_DIR` variable. (This folder will be synced to the `/opt/iinagent/credentials` folder in the IIN Agent container as specified in the [docker compose file](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/identity-management/iin-agent/docker-compose.yml).) Make sure you point to the right certificate and key file paths within the container using the `IIN_AGENT_TLS_CERT_PATH` and `IIN_AGENT_TLS_KEY_PATH` variables respectively.
782782

783783
- `docker-compose.yaml`: This specifies the properties of the IIN agent container. You can use the [file in the repository](https://github.com/hyperledger-labs/weaver-dlt-interoperability/blob/main/core/identity-management/iin-agent/docker-compose.yml) verbatim.
784784

785785
Now to start the IIN agent, navigate to the folder containing the above files and run the following:
786786
```bash
787-
docker-compose up -d
787+
docker compose up -d
788788
```
789789

790790
Repeat the above steps to launch an IIN Agent for every other organization on your channnel, i.e., create similar configuration files in an organization-specific folder. Make sure you:

docs/docs/external/getting-started/test-network/setup-local-docker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Before starting, make sure you have the following software installed on your hos
2626
- Curl: _install using package manager, like `apt` on Debian/Ubuntu Linux_
2727
- Git: [sample instructions](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
2828
- Docker: [sample instructions](https://docs.docker.com/engine/install/) (Latest version)
29-
- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 1.28.2 or higher, but lower than version V2)
29+
- Docker-Compose: [sample instructions](https://docs.docker.com/compose/install/) (Version 2 or higher)
3030
- Golang: [sample instructions](https://golang.org/dl/) (Version 1.20 or higher)
3131
- Java (JDK and JRE): [sample instructions](https://openjdk.java.net/install/) (Version 8)
3232
- Node.js and NPM: [sample instructions](https://nodejs.org/en/download/package-manager/) (Version 16 Supported)

0 commit comments

Comments
 (0)