Skip to content

Commit

Permalink
Use docker compose command instead of docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
minamijoyo committed Aug 12, 2024
1 parent 9ebc955 commit 0bba5b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- name: docker build
run: docker-compose build
run: docker compose build
- name: start localstack
run: |
docker-compose up -d localstack
docker-compose run --rm dockerize -wait tcp://localstack:4566 -timeout 60s
docker-compose exec -T localstack /docker-entrypoint-initaws.d/wait_s3_bucket_exists.sh
docker compose up -d localstack
docker compose run --rm dockerize -wait tcp://localstack:4566 -timeout 60s
docker compose exec -T localstack /docker-entrypoint-initaws.d/wait_s3_bucket_exists.sh
- name: terraform --version
run: docker-compose run --rm tfedit terraform --version
run: docker compose run --rm tfedit terraform --version
- name: testacc
run: docker-compose run --rm tfedit make testacc
run: docker compose run --rm tfedit make testacc
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,13 @@ For upgrading AWS provider v4, some rules have not been implemented yet. The cur

We recommend you to play an example in a sandbox environment first, which is safe to run `terraform` and `tfmigrate` command without any credentials. The sandbox environment mocks the AWS API with [localstack](https://github.com/localstack/localstack) and doesn't actually create any resources. So you can safely and easily understand how it works.

Build a sandbox environment with docker-compose and run bash:
Build a sandbox environment with docker compose and run bash:

```
$ git clone https://github.com/minamijoyo/tfedit
$ cd tfedit/
$ docker-compose build
$ docker-compose run --rm tfedit /bin/bash
$ docker compose build
$ docker compose run --rm tfedit /bin/bash
```

In the sandbox environment, create and initialize a working directory from test fixtures:
Expand Down Expand Up @@ -305,7 +305,7 @@ To clean up the sandbox environment:
# cd ../../
# rm -rf tmp/dir1
# exit
$ docker-compose down
$ docker compose down
```

Tips: If you see something was wrong, you can run the `awslocal` command, which is configured to call AWS APIs to the localstack endpoint:
Expand Down

0 comments on commit 0bba5b3

Please sign in to comment.