Skip to content

Commit

Permalink
Use docker compose instead of docker-compose (#173)
Browse files Browse the repository at this point in the history
The old `docker-compose` command no longer exists in some environments
and causes build failures. Instead use the replacement `docker compose`
command.

Signed-off-by: Mark S. Lewis <[email protected]>
  • Loading branch information
bestbeforetoday authored Aug 5, 2024
1 parent 4293c20 commit 259f00c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/test/fixtures/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ rm -rf crypto-material/crypto-config

cd docker-compose

docker-compose -f docker-compose-cli.yaml up -d
docker compose -f docker-compose-cli.yaml up -d
docker exec -t cli cryptogen generate --config=/etc/hyperledger/config/crypto-config.yaml --output /etc/hyperledger/config/crypto-config
docker exec -t cli configtxgen -profile ThreeOrgsOrdererGenesis -outputBlock /etc/hyperledger/config/genesis.block -channelID testchainid
docker exec -t cli configtxgen -profile ThreeOrgsChannel -outputCreateChannelTx /etc/hyperledger/config/channel.tx -channelID mychannel
docker exec -t cli configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate /etc/hyperledger/config/Org1MSPanchors.tx -channelID mychannel -asOrg Org1MSP
docker exec -t cli configtxgen -profile ThreeOrgsChannel -outputAnchorPeersUpdate /etc/hyperledger/config/Org2MSPanchors.tx -channelID mychannel -asOrg Org2MSP
docker exec -t cli cp /etc/hyperledger/fabric/core.yaml /etc/hyperledger/config
docker exec -t cli sh /etc/hyperledger/config/rename_sk.sh
docker-compose -f docker-compose-cli.yaml down --volumes
docker compose -f docker-compose-cli.yaml down --volumes
4 changes: 2 additions & 2 deletions src/test/java/scenario/ScenarioSteps.java
Original file line number Diff line number Diff line change
Expand Up @@ -577,13 +577,13 @@ private static String exec(Path dir, String... commandArgs) throws IOException,
static void startFabric(boolean tls) throws Exception {
createCryptoMaterial();
String dockerComposeFile = tls ? DOCKER_COMPOSE_TLS_FILE : DOCKER_COMPOSE_FILE;
exec(DOCKER_COMPOSE_DIR, "docker-compose", "-f", dockerComposeFile, "-p", "node", "up", "-d");
exec(DOCKER_COMPOSE_DIR, "docker", "compose", "-f", dockerComposeFile, "-p", "node", "up", "-d");
Thread.sleep(10000);
}

static void stopFabric(boolean tls) throws Exception {
String dockerComposeFile = tls ? DOCKER_COMPOSE_TLS_FILE : DOCKER_COMPOSE_FILE;
exec(DOCKER_COMPOSE_DIR, "docker-compose", "-f", dockerComposeFile, "-p", "node", "down");
exec(DOCKER_COMPOSE_DIR, "docker", "compose", "-f", dockerComposeFile, "-p", "node", "down");
}

private static void createCryptoMaterial() throws Exception {
Expand Down

0 comments on commit 259f00c

Please sign in to comment.