git command is not installed in image aws/codebuild/amazonlinux2-x86_64-standard:corretto8-23.05.22
y-isono opened this issue · 1 comments
y-isono commented
Issue description
git command is not installed in image aws/codebuild/amazonlinux2-x86_64-standard:corretto8-23.05.22
To Reproduce
Steps to reproduce the behavior:
In build using that image, git command is fail.
ex)
version: 0.2
phases:
build:
commands:
- git --version
It seems that in this image, git is not installed.
# Install git, SSH, and other utilities
RUN set -ex \
&& yum update -y \
&& yum install -y -q openssh-clients tar gzip wget unzip perl\
&& mkdir ~/.ssh \
&& mkdir -p /opt/tools \
&& mkdir -p /codebuild/image/config \
&& touch ~/.ssh/known_hosts \
&& ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \
&& ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H bitbucket.org >> ~/.ssh/known_hosts \
&& chmod 600 ~/.ssh/known_hosts
Expected behavior
git command can be used in this image.
Workaround
Install git manually in buildspec.yaml
ex)
version: 0.2
phases:
build:
commands:
- sudo yum install git -y
- git --version
leoherran-aws commented
Fixed in latest release 3228c52#diff-3962250b5d64adba08e1d4ce0d881297fd5a463568e349290414c5fcebefdc8c