Skip to content

DEVOP-82: Enable Docker Compose V2 #144

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ SHELL := /bin/bash
YAMLLINT := /usr/local/bin/yamllint
YAMLLINTFLAGS := --config-file yamllint-config.yaml

COMPOSE := docker compose

$(YAMLLINT):
pip3 install --user yamllint

Expand All @@ -20,7 +22,7 @@ lint-yaml: $(YAMLLINT)

.PHONY: test-smoke
test-smoke:
docker-compose -f docker-compose.yml -f docker-compose-ci.yml config
$(COMPOSE) -f docker-compose.yml -f docker-compose-ci.yml config

.PHONY: test-docker-dev
test-docker-dev:
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ ln -sf $(pwd)/streamr-docker-dev/bin.sh /usr/local/bin/streamr-docker-dev

The docker stack has not been tested in a Windows environment and is not recommended at this time.

If you know what services you need, you don't need to use the `bin.sh`, you can just use `docker-compose` directly, like so:
If you know what services you need, you don't need to use the `bin.sh`, you can just use `docker compose` directly, like so:

1. Install and start Docker service.

2. Clone this repo: `git clone [email protected]:streamr-dev/streamr-docker-dev.git`, change into that directory `cd streamr-docker-dev`

3. Bind the loopback interface to 10.200.10.1: `netsh int ip add address "Loopback" 10.200.10.1`

4. For instance, for the Ethereum environment without core-api: `docker-compose up parity-node0 parity-sidechain-node0 bridge`
4. For instance, for the Ethereum environment without core-api: `docker compose up parity-node0 parity-sidechain-node0 bridge`

## Quickstart

Expand Down Expand Up @@ -287,8 +287,7 @@ I received this error only during `docker login`, after login I could resume usi

| File | Description |
|:-----------------------------|:----------------------------------------------------------------|
| docker-compose.yml | Supporting services stack (MySQL, Cassandra, Redis, etc.) |
| docker-compose.override.yml | Streamr service stack |
| docker-compose.yml | Streamr and supporting services stack (MySQL, Cassandra, Redis, etc.)|
| custom-mysql-settings.cnf | Custom MySQL settings |
| mysql\_init\_scripts | Database dumps used to initalize MySQL databases |
| keyspace.cql | Keyspace definitions and demo data for Cassandra |
Expand Down
4 changes: 2 additions & 2 deletions streamr-docker-dev/bin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ DRY_RUN=0
FOLLOW=0
WAIT=0
WAIT_TIMEOUT=300 # seconds
DOCKER_COMPOSE="docker-compose --ansi never -f docker-compose.yml"
DOCKER_COMPOSE="docker compose --ansi never -f docker-compose.yml"
if [ -n "${CI-}" ]; then # Apply CI override when running on CI server
DOCKER_COMPOSE="$DOCKER_COMPOSE -f docker-compose-ci.yml"
fi
Expand Down Expand Up @@ -147,7 +147,7 @@ wait() {
while [[ $time_waited -lt $WAIT_TIMEOUT ]]; do
waiting_for_services=()

# Get the id of each image we have in docker-compose
# Get the id of each image we have in docker compose
for image_id in $($DOCKER_COMPOSE ps -q)
do
service_name=$(docker inspect -f "{{.Name}}" "$image_id")
Expand Down
2 changes: 1 addition & 1 deletion streamr-docker-dev/help_scripts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Examples:

pull_help() {
echo "
Pulls images defined in docker-compose files. If no services are given, pulls all of them.
Pulls images defined in docker compose files. If no services are given, pulls all of them.

Usage: streamr-docker-dev pull [ [--] <service>...]

Expand Down