Skip to content
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

aqua proxy might solve managing pinned dockerized cli tools #1928

Open
sheldonhull opened this issue May 3, 2023 · 2 comments
Open

aqua proxy might solve managing pinned dockerized cli tools #1928

sheldonhull opened this issue May 3, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@sheldonhull
Copy link

sheldonhull commented May 3, 2023

Proposal: Adding a docker_command package type to the Aqua toolchain.

Whalebrew provides a cli experience to invoke dockerized commands. However, it was more clunky than I'd like. But there seems to be a lot of interest in the project in the past. People working with mixed toolchains would like to have tools that don't have static binaries contained in a docker image. For example, the AWS CLI requires running Python install commands, and conflicts between version one and two could occur. Using a docker image solves those concerns.

My proposal is to add a new package type called docker_command to the Aqua toolchain. This would allow users to invoke CLI commands that Aqua proxy resolves since it was shimmed. Here's an example of how this could work:

- name: [email protected]
  registry: local
  args_docker_custom: []
  args_cli_custom: []
registry:
- name: aws-cli
  type: docker_command
  image: amazon/aws-cli:2.11.16
  args_docker_default:
    - '--rm'
  volume_mounts:
    - '${PWD}:/work'
    - '${HOME}/.aws:/home/nonroot/.aws:ro'

Invoke aws would then be aqua proxy constructing that docker command with volume mounts and such so it works be transparent and function like a normal cli.

This feature would let me use Aqua to manage and pin dockerized tools in the same wonderful experience I get through Aqua. This would eliminate clunky shell aliases trying to accomplish the same thing and benefit from the same version pinned and managed process aqua currently provides.

Reference

@suzuki-shunsuke suzuki-shunsuke added enhancement New feature or request proposal and removed proposal labels May 3, 2023
@suzuki-shunsuke
Copy link
Member

I'm interested in how whalebrew mounts the host directory.
Does it mount the root directory? 🤔

@suzuki-shunsuke
Copy link
Member

suzuki-shunsuke commented Oct 16, 2023

Oh, I see.

https://github.com/whalebrew/whalebrew#how-it-works

When a package is executed, Whalebrew will run the specified image with Docker, mount the current working directory in /workdir, and pass through all of the arguments.

So whalebrew can't read and write files outside of the current directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
No open projects
Status: No status
Development

No branches or pull requests

2 participants