According to this page: Advanced options for Autobuild and Autotest | Docker Documentation
I created a hooks/build file and wrote something like this:
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.rpm.sh | bash
yum install git-lfs -y
To install git-lfs. and got an error like this:
2023-07-08T09:38:00Z Detected operating system as ubuntu/18.
2023-07-08T09:38:00Z Checking for curl...
2023-07-08T09:38:00Z Detected curl...
2023-07-08T09:38:00Z Downloading repository file: https://packagecloud.io/install/repositories/github/git-lfs/config_file.repo?os=ubuntu&dist=18&source=script
2023-07-08T09:38:00Z main: line 165: /etc/yum.repos.d/github_git-lfs.repo: No such file or directory
2023-07-08T09:38:00Z
2023-07-08T09:38:00Z Unable to run:
2023-07-08T09:38:00Z curl https://packagecloud.io/install/repositories/github/git-lfs/config_file.repo?os=ubuntu&dist=18&source=script
2023-07-08T09:38:00Z
2023-07-08T09:38:00Z Double check your curl installation and try again.
2023-07-08T09:38:00Z hooks/build: line 30: yum: command not found
- It seems yum is not installed but the doc said that the machine is based on Amazon Linux 2 which is Red Hat so it should have yum command available. Why is it not available?
- I need to use git-lfs to pull some binary files to be copied into the docker build process. How can I do it?
- Can we see the default content of hooks/build file before it’s overriden by me? I want to know how exactly Docker writes their own build command so that I can modify it to suit my needs. Because I have an issue where the cache of docker images is not utilized properly in my own hooks/build file. I want to see how to preserve the cache between builds.