我在centos 7主机上运行了一个码头映像(gitlab-runner)。在容器中,奇怪的是它有apt命令,但是没有yum command.But系统似乎是一个中心而不是ubuntu?
root@vultr:/usr/local/java# uname -r
3.10.0-1062.4.1.el7.x86_64我用apt-get install来安装yum,然后我想做yum更新,但是我遇到了以下问题,如何处理?
root@vultr:/usr/local/java# yum update
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
You can enable repos with yum-config-manager --enable <repo>
root@vultr:/usr/local/java# yum repolist all
repolist: 0
root@vultr:/usr/local/java# yum list
root@vultr:/usr/local/java#
root@vultr:/usr/local/java#
root@vultr:/usr/local/java# yum-config-manager --enable
Error: Trying to enable already enabled repos.
==================================================================================================== main ====================================================================================================
[main]
alwaysprompt = True
assumeyes = False
bandwidth = 0
bugtracker_url = http://yum.baseurl.org/report
cache = 0
cachedir = /var/cache/yum
clean_requirements_on_remove = False
color = auto
color_list_available_downgrade = dim,cyan
color_list_available_install = normal
color_list_available_reinstall = bold,underline,green
color_list_available_upgrade = bold,blue
color_list_installed_extra = bold,red
color_list_installed_newer = bold,yellow
color_list_installed_older = bold
color_list_installed_reinstall = normal
color_search_match = bold
color_update_installed = normal
color_update_local = bold
color_update_remote = normal
commands =
debuglevel = 2
diskspacecheck = True
distroverpkg = redhat-release
enable_group_conditionals = True
enabled = True
enablegroups = True
errorlevel = 2
exactarch = True
exactarchlist = kernel,
kernel-smp,
kernel-hugemem,
kernel-enterprise,
kernel-bigmem,
kernel-devel,
kernel-PAE,
kernel-PAE-debug
exclude =
exit_on_lock = False
failovermethod = roundrobin
gaftonmode = False
gpgcheck = False
group_package_types = mandatory,
default
groupremove_leaf_only = False
history_list_view = single-user-commands发布于 2019-12-01 07:23:01
GitLab运行程序映像是基于Ubuntu或Alpine的。这是在医生里声明的:
可获得下列Docker图像:
gitlab/gitlab-runner:latest。gitlab/gitlab-runner:alpine基于阿尔卑斯山,占地面积小得多(~160/350MB Ubuntu ~45/130MB阿尔卑斯压缩/解压)。Ubuntu和Alpine都有自己的包管理系统-- apt和apk。可以使用这些包管理器在容器中添加/删除包。yum是RHEL/Fedora类Linux发行版的包管理器,Ubuntu或Alpine都不使用它。
https://unix.stackexchange.com/questions/554976
复制相似问题