开发者

How to install Skopeo on AWS Linux?

开发者 https://www.devze.com 2022-12-07 21:52 出处:网络
I am trying to install skopeo on AWS Linux but get开发者_StackOverflow中文版ting error - No package found.

I am trying to install skopeo on AWS Linux but get开发者_StackOverflow中文版ting error - No package found.

[root@master ~]# yum -y install skopeo
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core                                                                                                               | 3.7 kB  00:00:00
228 packages excluded due to repository priority protections
No package skopeo available.
Error: Nothing to do
[root@master ~]#

How can I install Skopeo on AWS Linux?

Is there any other tool available on AWS linux which helps to inspect images?


Edited: This package is available in the CentOS-7 Extras repo. Enabling this repo on Amazon Linux 2 may have unintended consequences. You may want to consider running an EC2 instance of CentOS or RHEL to manage this workload. If you want to live on the edge IMO, do the below at your own risk.

You can either download (wget or curl) and install the package manually with rpm, and resolve the dependencies, or you can configure the CentOS-7 repository and try to install directly with Yum.

In order to install packages from the CentOS-7 Extras repo, you need to download the GPG key :

cd /etc/pki/rpm-gpg/
curl -s https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7

You will then need to create a repo file in /etc/yum.repos.d :

[extras]
name=CentOS-7 - Extras
mirrorlist=http://mirrorlist.centos.org/?release=7&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/7/extras/$basearch/
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
priority=1

This only gets you part way there :

# yum --disablerepo='*' --enablerepo='extras' search skopeo
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
============================================================================================ N/S matched: skopeo =============================================================================================
skopeo.x86_64 : Inspect container images and repositories on registries
skopeo-containers.x86_64 : Configuration files for working with image signature

containers-common has a dependency on subscription-manager which is part of the CentOS-7 core packages, and there are related dependencies. You can download these core packages here :

http://mirror.centos.org/centos/7/os/x86_64/Packages/

You will need the following packages :

cd /tmp
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/subscription-manager-1.24.42-1.el7.centos.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/subscription-manager-plugin-ostree-1.24.42-1.el7.centos.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/subscription-manager-rhsm-1.24.42-1.el7.centos.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/subscription-manager-rhsm-certificates-1.24.42-1.el7.centos.x86_64.rpm
wget python-syspurpose-1.24.42-1.el7.centos.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-syspurpose-1.24.42-1.el7.centos.x86_64.rpm
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/python-dmidecode-3.12.2-4.el7.x86_64.rpm

You will also need to install dependencies available from Amazon Linux 2 :

yum install dbus-python pygobject3-base python-decorator python-dmidecode python-ethtool python-inotify python-syspurpose python-gobject-base gobject-introspection

Now you can install the manually downloaded RPMs :

rpm -i *rpm

I completed all of these steps on a test server, and everything installed. I'm not familiar with the Skopeo tools, so I can't speak as to whether or not it will work.

Once word of caution, when you add third party repos to an OS, you risk unintentional upgrades of other packages during a normal OS upgrade, and this can break things.

You can avoid this by setting "enable = 0" in the Yum repo files, and enabling the repo at the command line ONLY when you want to update those packages (i.e. "yum --enablerepo=remi update skopeo")

OK, hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消