2024年最新Docker 在 openSUSE 下的安装、使用_docker 拉取 opensuse,2024面试

img
img

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以戳这里获取

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

4.1.12-1-default


建议你使用最新的系统,以为一直的 bug 都会在新的 kernel 发布中修复。


### 安装


openSUSE 13.2 起,自带了仓库,所以无需添加


#### 安装 openSUSE 国内镜像源


网络原因,访问 openSUSE 速度慢且不稳定,建议采用国内镜像库,下面例子是使用的 aliyun



zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.1/oss  openSUSE-42.1-Update-Oss

zypper addrepo -f http://mirrors.aliyun.com/opensuse/update/leap/42.1/non-oss/ openSUSE-42.1-Update-Non-Oss

zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.1/repo/oss/ openSUSE-42.1-Oss

zypper addrepo -f http://mirrors.aliyun.com/opensuse/distribution/leap/42.1/repo/non-oss/  openSUSE-42.1-Non-Oss

zypper addrepo -f http://mirrors.aliyun.com/packman/openSUSE_Leap_42.1/ aliyun-packman


#### 安装 Docker 包



$ sudo zypper in docker


输出如下:



linux-aihn:~ # zypper in docker
Retrieving repository ‘openSUSE-Leap-42.1-Update’ metadata --------------------------[|]

Warning: Digest verification failed for file ‘7256e9794decb02046412d2dc8ab5fa5a17875c1303f31663094da5ede29e933-app-icons.tar.gz’
[/var/cache/zypp/raw/repo-updateQVITjj/repodata/7256e9794decb02046412d2dc8ab5fa5a17875c1303f31663094da5ede29e933-app-icons.tar.gz]

expected 7256e9794decb02046412d2dc8ab5fa5a17875c1303f31663094da5ede29e933
but got a6be6f0868adbffa79d87856f6f3de4317a1e5c3f923be66eed899c4b559850b

Accepting packages with wrong checksums can lead to a corrupted system and in extreme cases even to a system compromise.

However if you made certain that the file with checksum ‘a6be…’ is secure, correct
and should be used within this operation, enter the first 4 characters of the checksum
to unblock using this file on your own risk. Empty input will discard the file.

Unblock or discard? [a6be/? shows all options] (discard): discard
Retrieving repository ‘openSUSE-Leap-42.1-Update’ metadata …[error]
Repository ‘openSUSE-Leap-42.1-Update’ is invalid.
[repo-update|http://download.opensuse.org/update/leap/42.1/oss/] Valid metadata not found at specified URL
Please check if the URIs defined for this repository are pointing to a valid repository.
Skipping repository ‘openSUSE-Leap-42.1-Update’ because of the above error.
Loading repository data…
Reading installed packages…
Resolving package dependencies…

The following 6 NEW packages are going to be installed:
bridge-utils docker git-core git-gui gitk perl-Error

6 new packages to install.
Overall download size: 10.6 MiB. Already cached: 0 B. After the operation, additional
50.7 MiB will be used.
Continue? [y/n/? shows all options] (y): y
Retrieving package perl-Error-0.17021-3.2.noarch (1/6), 28.3 KiB ( 49.8 KiB unpacked)
Retrieving: perl-Error-0.17021-3.2.noarch.rpm …[done]
Retrieving package bridge-utils-1.5-21.3.x86_64 (2/6), 32.0 KiB ( 66.0 KiB unpacked)
Retrieving: bridge-utils-1.5-21.3.x86_64.rpm …[done]
Retrieving package git-core-2.6.2-3.1.x86_64 (3/6), 3.9 MiB ( 25.7 MiB unpacked)
Retrieving: git-core-2.6.2-3.1.x86_64.rpm …[done (267.4 KiB/s)]
Retrieving package gitk-2.6.2-3.1.x86_64 (4/6), 217.2 KiB (705.6 KiB unpacked)
Retrieving: gitk-2.6.2-3.1.x86_64.rpm …[done]
Retrieving package git-gui-2.6.2-3.1.x86_64 (5/6), 296.1 KiB ( 1.3 MiB unpacked)
Retrieving: git-gui-2.6.2-3.1.x86_64.rpm …[done]
Retrieving package docker-1.9.1-13.1.x86_64 (6/6), 6.2 MiB ( 22.9 MiB unpacked)
Retrieving: docker-1.9.1-13.1.x86_64.rpm …[done (272.8 KiB/s)]
Checking for file conflicts: …[done]
(1/6) Installing: perl-Error-0.17021-3.2 …[done]
(2/6) Installing: bridge-utils-1.5-21.3 …[done]
(3/6) Installing: git-core-2.6.2-3.1 …[done]
(4/6) Installing: gitk-2.6.2-3.1 …[done]
(5/6) Installing: git-gui-2.6.2-3.1 …[done]
(6/6) Installing: docker-1.9.1-13.1 …[done]
Additional rpm output:
creating group docker…
Updating /etc/sysconfig/docker…


### 启动 docker 守护进程



$ sudo systemctl start docker.service


### 配置让 docker 服务随系统自动启动



$ sudo systemctl enable docker.service


docker 会创建一个以`docker`命名的用户组,添加用户到这个用户组



sudo /usr/sbin/usermod -a -G docker


### 卸载 docker


卸载 Docker 包:



$ sudo zypper rm docker


上述命令不会卸载 images、containers、volumes, 或者用户创建在主机的配置文件。若想卸载干净上述所有 images、containers、volumes, 执行:



$ rm -rf /var/lib/docker


用户创建在主机的配置文件需手动删除。


### 拉取 image 到本地


可以将 Docker Bub 存储的 image 拉取到本地,执行 



docker pull waylau/docker-spring-boot


输出如下:



linux-aihn:~ # docker pull waylau/docker-spring-boot
Using default tag: latest
Pulling repository docker.io/waylau/docker-spring-boot
3694bcee2712: Download complete
a2e9c1527ca5: Download complete
20f4b5a54fc6: Download complete
7a220626bc9e: Download complete
620bbe9b8954: Download complete
a0b5e5298dc5: Download complete
2f8558117280: Download complete
d2ee7992d027: Download complete
Status: Downloaded newer image for waylau/docker-spring-boot:latest
docker.io/waylau/docker-spring-boot: this image was pulled from a legacy registry. Important: This registry version will not be supported in future versions of docker.


### 运行 image 本地镜像


执行:



深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!


img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上鸿蒙开发知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

需要这份系统化的资料的朋友,可以戳这里获取

)]

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上鸿蒙开发知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

需要这份系统化的资料的朋友,可以戳这里获取

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值