atlantis icon indicating copy to clipboard operation
atlantis copied to clipboard

Unable to install jq

Open ssaxen0-0909 opened this issue 2 years ago • 2 comments

I have a ECS cluster which is hosted on fargate task.

I have to execute one script under a prehook. the script is simple it is triggering a codebuild project. I am using jq to read the json file and pass the environment variables. However when I am running this script , the server is giving me this error :

bash: line 1: yum: command not found

I am running this script in a prehook but since jq is not isntalled my script is not working.

ssaxen0-0909 avatar Feb 11 '24 15:02 ssaxen0-0909

I dont think we have a centos container which would use yum. The default container is alpine which uses apk. Also ubuntu is supported which uses apt.

If you're using the latest version, neither of these will work in your pipeline since the default user is non-root. In order to install custom tools, you will have to customize the base container.

Here is what we currently install

https://github.com/runatlantis/atlantis/blob/44cf761ffe711ea3f513ba88d0ed89b243859234/Dockerfile#L161-L169

I'm surprised jq isn't listed. Maybe the ask could be to preinstall it in the container.

nitrocode avatar Feb 11 '24 17:02 nitrocode

it is possible now to do this :

https://github.com/runatlantis/atlantis/blob/main/docker-entrypoint.sh#L32

This way you do not need to customize the container and just mount a script that will install all the tools for you.

On Sun, Feb 11, 2024 at 9:14 AM nitrocode @.***> wrote:

I dont think we have a centos container which would use yum. The default container is alpine which hses apk. Also ubuntu is supported which uses apt.

If you're using the latest version, neither of these will work in your pipeline since the default user is non-root. In order to install custom tools, you will have to customize the base container.

Here is what we currently install

https://github.com/runatlantis/atlantis/blob/44cf761ffe711ea3f513ba88d0ed89b243859234/Dockerfile#L161-L169

I'm surprised jq isn't listed. Maybe the ask could be to preinstall it in the container.

— Reply to this email directly, view it on GitHub https://github.com/runatlantis/atlantis/issues/4232#issuecomment-1937812919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQ3ERBSH7N73MSD6MN67ILYTD37XAVCNFSM6AAAAABDDTYJYWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZXHAYTEOJRHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

jamengual avatar Feb 12 '24 06:02 jamengual