diff --git a/DOCKER_INSTALLATION.md b/DOCKER_INSTALLATION.md index a46e904ee2..7e135bd6f8 100644 --- a/DOCKER_INSTALLATION.md +++ b/DOCKER_INSTALLATION.md @@ -8,47 +8,56 @@ If you don't have Docker installed on your machine, you'll run into some complic Below are the steps on how you can avoid that. -First you need to setup docker-compose as it is an underlying tool that this command: `pnpm run docker` fires behind the scene. +First you need to setup docker compose as it is an underlying tool that this command: `pnpm run docker` fires behind the scene. ## Linux -To install Docker Compose on Linux Ubuntu via the terminal, you can follow these steps: +To install Docker Compose on Linux Ubuntu, you can follow these steps: -1. Update the package index on your system by running the following command: +1. Create the Docker config directory and cli-plugins subdirectory: ```shell - sudo apt update + DOCKER_CONFIG=${DOCKER_CONFIG:-$HOME/.docker} + mkdir -p $DOCKER_CONFIG/cli-plugins ``` -2. Install the required dependencies by running the following command: +2. Download the Docker Compose plugin: ```shell - sudo apt install curl + curl -SL "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o $DOCKER_CONFIG/cli-plugins/docker-compose ``` -3. Download the Docker Compose binary into the `/usr/local/bin` directory using the `curl` command: + Note: + + - To install for all users, replace `$DOCKER_CONFIG/cli-plugins` with `/usr/local/lib/docker/cli-plugins` + +3. Set the appropriate permissions to make the Docker Compose plugin executable: ```shell - sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose + chmod +x $DOCKER_CONFIG/cli-plugins/docker-compose ``` -4. Set the appropriate permissions to make the `docker-compose` binary executable: + If you installed for all users: ```shell - sudo chmod +x /usr/local/bin/docker-compose + sudo chmod +x /usr/local/lib/docker/cli-plugins/docker-compose ``` -5. Verify that Docker Compose has been successfully installed by running the following command: +4. Verify that Docker Compose has been successfully installed: ```shell - docker-compose --version + docker compose version ``` - This command should display the version information of Docker Compose without any errors. + You should see output similar to: + + ``` + Docker Compose version vX.Y.Z + ``` -After following these steps, you should have Docker Compose installed on your Ubuntu system, and you can use it by running `docker-compose` commands in the terminal. +After following these steps, you should have Docker Compose installed on your Ubuntu system, and you can use it by running `docker compose` commands in the terminal. -When you've verified that the `docker-compose` package is installed and you proceed to start Docker with `pnpm run docker`. +When you've verified that the `docker compose` package is installed and you proceed to start Docker with `pnpm run docker`. You'll probably get an error similar to the one below: diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 8cc7f4565c..4ddceeee56 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -140,6 +140,7 @@ services: # - "REDIS_CLUSTER_CREATOR=yes" electric: + container_name: electric image: electricsql/electric:1.0.0-beta.15@sha256:4ae0f895753b82684aa31ea1c708e9e86d0a9bca355acb7270dcb24062520810 restart: always environment: diff --git a/package.json b/package.json index 0fc50ad704..20203eb39d 100644 --- a/package.json +++ b/package.json @@ -20,11 +20,11 @@ "format": "prettier . --write --config prettier.config.js", "generate": "turbo run generate", "lint": "turbo run lint", - "docker": "docker-compose -p triggerdotdev-docker -f docker/docker-compose.yml up -d --build --remove-orphans", - "docker:stop": "docker-compose -p triggerdotdev-docker -f docker/docker-compose.yml stop", - "dev:docker": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d", - "dev:docker:build": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d --build", - "dev:docker:stop": "docker-compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml stop", + "docker": "docker compose -p triggerdotdev-docker -f docker/docker-compose.yml up -d --build --remove-orphans", + "docker:stop": "docker compose -p triggerdotdev-docker -f docker/docker-compose.yml stop", + "dev:docker": "docker compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d", + "dev:docker:build": "docker compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml up -d --build", + "dev:docker:stop": "docker compose -p triggerdotdev-dev-docker -f docker/dev-compose.yml stop", "test": "turbo run test --concurrency=1 -- --run", "test:webapp": "turbo run test --filter webapp -- --run", "test:packages": "turbo run test --concurrency=1 --filter \"@trigger.dev/*\" -- --run",