Skip to content
This repository has been archived by the owner on Jul 12, 2022. It is now read-only.

Fixes issue #987, restoring compatibility with Docker Desktop < 2.5.0 on Windows/MacOS and adding compatibility to WSL* #989

Merged
merged 6 commits into from
Jul 2, 2021

Conversation

dcominottim
Copy link
Contributor

@dcominottim dcominottim commented Jul 1, 2021

Description

Fixes issue #987.

How to verify it

Follow the instructions on #987.

Changelog

Adds logic to properly switch between 'docker' and 'com.docker.cli' binary names as needed according to the environment.


This pull request generated the following artifacts.

To test the health and quality of this implementation, download the respective binary for your operating system, unzip and directly run the binary like the examples below.

  • Windows
    Download the file: rit-windows.zip
    Unzip to some folder like: C:\home\user\downloads\pr989
    Access the folder: cd C:\home\user\downloads\pr989
    Directly call the binary: .\rit.exe --version or .\rit.exe name of formula

  • Linux
    Download the file: rit-linux.zip
    Unzip to some folder like: /home/user/downloads/pr989
    Access the folder: cd /home/user/downloads/pr989
    Assign execute permission to binary: chmod +x ./rit
    Directly call the binary: ./rit --version or ./rit name of formula

  • MacOS
    Download the file: rit-macos.zip
    Unzip to some folder like: /home/user/downloads/pr989
    Access the folder: cd /home/user/downloads/pr989
    Assign execute permission to binary: chmod +x ./rit
    Directly call the binary: ./rit --version or ./rit name of formula

Generated at Thu Jul 01 2021 20:17:29 GMT+0000 (Coordinated Universal Time)

… to 'com.docker.cli'.

Signed-off-by: Danilo Cominotti Marques <dcominottim@gmail.com>
… to 'com.docker.cli'.

Signed-off-by: Danilo Cominotti Marques <dcominottim@gmail.com>
@dcominottim dcominottim changed the title Fixes #987, restoring compatibility with Docker Desktop < 2.5.0 on Windows/MacOS and adding compatibility to WSL* Fixes issue #987, restoring compatibility with Docker Desktop < 2.5.0 on Windows/MacOS and adding compatibility to WSL* Jul 1, 2021
@GuillaumeFalourd
Copy link
Contributor

GuillaumeFalourd commented Jul 1, 2021

Do you have a way to check these scenarios using automated tests (for example with github actions)?

@dcominottim
Copy link
Contributor Author

dcominottim commented Jul 1, 2021

Do you have a way to check these scenarios using automated tests (for example with github actions)?

Hi, @GuillaumeFalourd! Unfortunately, I am not aware of any way to invoke Docker commands in an Action workflow. The only kind of Docker usage I know that works is running the Action itself within a Docker container, but here we want to interact with the Docker daemon itself (by invoking a Ritchie Formula with the Docker Runner), which I doubt will ever be a supported workflow in GitHub Actions because of security reasons. I can say I've tested the changes in my local machine -- would be nice to have a second person testing them. Actually, that is an issue that might make us have to use something else instead of GitHub Actions in the future, because otherwise we'll never be able to perform automated tests for Formula execution with the Docker Runner -- which is a key feature from Ritchie.

@dcominottim
Copy link
Contributor Author

We could do this in CircleCI, but I don't have access yet (have requested it).

@dcominottim
Copy link
Contributor Author

Another possibility -- that would allow us to still use GitHub Actions -- would consist of using a self-hosted runner, but we won't be able to set this up without several days or weeks of discussion about the infrastructure concerns, costs, and so on.

https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners

@GuillaumeFalourd
Copy link
Contributor

Thank you @dcominottim 👍🏼
We'll check the implementation is working as expected on different OS and then merge it and open an ISSUE to create those scenarios using automated tests in the future.

@dcominottim
Copy link
Contributor Author

Thank you @dcominottim 👍🏼
We'll check the implementation is working as expected on different OS and then merge it and open an ISSUE to create those scenarios using automated tests in the future.

Thanks a lot, @GuillaumeFalourd and @fabianofernandeszup. You guys rock!

Copy link
Contributor

@GuillaumeFalourd GuillaumeFalourd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@GuillaumeFalourd GuillaumeFalourd merged commit e292b80 into ZupIT:master Jul 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐳 Docker Related to Docker 🔨 improvement Improvement in features usability Related to tool usability
Projects
None yet
3 participants