This quick guide shows you how to build a Dockerized argocd
CLI. The advantage of this setup is that it's platform-independent. Also, I personally found the Linux installation annoying and buggy, and this proves to be a much more streamlined approach. Interestingly enough, the MacOS and the Windows installers were way less finnicky.
Save the text below to Dockerfile.argocd
in a folder called docker
FROM argoproj/argocd:v1.7.6 as builder
FROM ubuntu:18.04 as app
COPY --from=builder /usr/local/bin/argocd /usr/local/bin/argocd
ENTRYPOINT [ "argocd" ]
Builds the file Dockerfile.argocd
, located in the docker
folder. Build context is docker
docker build -f docker/Dockerfile.argocd -t argocd-cli:1.0.0 docker
Create an alias and add it to your .bashrc
. This maps your local .kube/config
and local ./argocd/config
files to the ones in the container.
If you use Windows, alias creation will be a bit different for you. If you use a different 'nix shell, such as fish, for example, you'll save the alias to ~/.config/fish/config.fish
instead.
alias argocd='docker run -it --rm -v ~/.kube/config:/root/.kube/config -v ~/.argocd/config:/root/.argocd/config argocd-cli:1.0.0' >> ~/.bashrc
Run your favorite argocd
commands. For example:
argocd version
argocd repo add
argocd login