project-copacetic / copacetic

🧵 CLI tool for directly patching container images using reports from vulnerability scanners

Home Page:https://project-copacetic.github.io/copacetic/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to install Copa for Ubuntu 22.04 machine?

ajmal-yazdani opened this issue · comments

What is your question?

Team,

I tried below commands but seems this is not working to install Copa for Ubuntu 22.04 machine:

https://project-copacetic.github.io/copacetic/website/installation#development-setup

git clone https://github.com/project-copacetic/copacetic
cd copacetic
make
--OPTIONAL: install copa to a pathed folder
sudo mv dist/linux_amd64/release/copa /usr/local/bin/

Could you please guide how to install ?

@ajmal-yazdani looks like you are looking at development instructions.

You can install the copa binary using homebrew (https://project-copacetic.github.io/copacetic/website/installation#homebrew) or download the binary directly from github releases (https://github.com/project-copacetic/copacetic/releases)

@sozercan! Thanks for your reply.

I don't have Mac and using some tutorial I am able to install homebrew in ubuntu 22.04 machine.

After that I am able to install Copa using command brew install copa, however I noticed that sudo copa not works and seems it's not possible though (not sure). discussion here, https://askubuntu.com/questions/1498132/why-sudo-copa-command-not-working-while-copa-commands-works/1498172?noredirect=1#comment2624938_1498172

I have gone through the video session provided by you here, https://www.youtube.com/watch?v=DUt4wnKV4a8&t=14s
and following all the steps.

I am able to run all command, but the last command copa patch -i docker.io/library/nginx:1.18.0 -r nginx.1.18.0.json -t 1.18.0-patched -a tcp://0.0.0.0:8888 is not working and always getting "CANCELED exporting to docker image format" message at the end.

Please check attached "result.txt" file for all command output.

result.txt

Could you please help here what I am missing and how can I make it working.

Thanks, Ajmal.

@ajmal-yazdani thanks for posting the logs! Everything looks fine to me and I can not reproduce this unfortunately.

Can you run the copa patch .. command again with --debug flag and post the output when you get a chance?

Other things you can try is to use a buildx instance instead of running buildkit directly or use containerd image store. Please see https://project-copacetic.github.io/copacetic/website/quick-start for those options

@sozercan !!! Thanks, and appreciate your reply.

I have finally installed Copa using below commands in Ubuntu machine and now "sudo copa' works.

After that all the commands runs successfully.

git clone https://github.com/project-copacetic/copacetic
cd copacetic
make

OPTIONAL: install copa to a pathed folder

sudo mv dist/linux_amd64/release/copa /usr/local/bin/