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

Custom command params substitution #449

Open
joihn opened this issue May 12, 2023 · 5 comments
Open

Custom command params substitution #449

joihn opened this issue May 12, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@joihn
Copy link

joihn commented May 12, 2023

thanks for this tool. small issue:

Describe the bug
on latest master (as of 12may), custom command parameter subsitution is not working. The bug does not appear on latest relase.

To Reproduce

  1. build from master as of 12 may
  2. use this example custom command
customCommands:
  containers:
    - name: bash
      attach: true
      command: 'docker exec -it {{ .Container.ID }} bash'
      serviceNames: []
  1. try to launch the custom command
    Container.ID does not get correctly subsituted. it stay as it when sent to bash

ENV:
ubuntu 20.04, x86

@joihn joihn added the bug Something isn't working label May 12, 2023
@mark2185
Copy link
Contributor

I think it's the same what I stumbled upon, seems to be introduced by #387 .

@ngocphamm
Copy link

And now I think it get into the latest release 0.21.0.

I have this custom command trying to update a service's image by doing docker compose pull && docker compose up.

customCommands:
  services:
    - name: update-service
      attach: true
      command: '{{ .DockerCompose }} pull {{ .Service.Name }} && {{ .DockerCompose }} up {{ .Service.Name }}'

Run it and I get this

CleanShot 2023-07-21 at 14 46 20@2x

@VaultVulp
Copy link

For anyone wondering how to downgrade back to 0.20.0 via homebrew - you can use the following snippet:

wget https://raw.githubusercontent.com/jesseduffield/homebrew-lazydocker/b6d29bcd59058d1b7ec371df12f75d7048b40789/lazydocker.rb
brew uninstall lazydocker
brew install -s lazydocker.rb
rm ./lazydocker.rb

@jesseduffield
Copy link
Owner

This should now be fixed in https://github.com/jesseduffield/lazydocker/releases/tag/v0.21.1 (waiting on homebrew to merge it). Sorry it took so long! Thanks to @mark2185 for the fix

@mark2185
Copy link
Contributor

I believe it has been merged into homebrew so this issue can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants