illusionist
illusionist

Reputation: 13

Issues with Docker ECS Integration using GitHub Actions: Errors with Context Creation and Installation

I'm setting up Docker ECS integration using GitHub Actions, but I'm running into some issues during the installation and context creation phases. Below are the steps I'm using and the errors I'm encountering.

Questions:

For the First Try: It seems that the script is running but failing during the download phase. The error message indicates that no URL is specified for curl. Is there an issue with the installation script, it was worked before tho?

For the Second Try: The command docker context create ecs ecscontext fails with the message that it requires exactly 1 argument. What is the correct way to use this command to create a Docker context for ECS?

Any help or guidance on resolving these issues would be greatly appreciated!

First Try Downloading the Docker and fail:

    - name: Create Docker Context for ECS   
      run: |
        curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh
        docker context create ecs ecscontext --from-env

Output: Docker download fail for following reason:

    Run curl -L https://raw.githubusercontent.com/docker/compose-cli/main/scripts/install/install_linux.sh | sh   
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                               Dload  Upload   Total   Spent    Left  Speed   
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0 
Running checks... 
100  5982  100  5982    0     0  34182      0 --:--:-- --:--:-- --:--:-- 34182 
Checks passed! 
Downloading CLI... 
curl: no URL specified! 
curl: try 'curl --help' or 'curl --manual' for more information

Second Try:

    - name: Install Docker CLI
  run: |
    sudo apt-get update
    sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
    sudo apt-get update
    sudo apt-get install -y docker-ce docker-ce-cli containerd.io

- name: Install Docker Compose CLI
  run: |
    DOCKER_COMPOSE_VERSION=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | grep 'tag_name' | cut -d\" -f4)
    curl -L "https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    chmod +x /usr/local/bin/docker-compose
    docker context create ecs ecscontext

Output:

"docker context create" requires exactly 1 argument.

Upvotes: 1

Views: 89

Answers (0)

Related Questions