《OpenShift 4.x HOL教程汇总》

文章目录

  • 关于 UBI
  • 构建包含可独立运行的应用的容器镜像
    • 下载基础UBI镜像
    • 基于UBI镜像,构建新的应用镜像
  • 构建以服务运行的应用的容器镜像
    • 下载基础UBI镜像
    • 从头开始创建一个应用镜像
  • 在 S2I 中使用UBI镜像
  • 参考

关于 UBI

红帽通用基础映像(UBI)被设计为在容器中开发的云原生和Web应用程序用例的基础。你可以使用UBI构建一个容器化的应用程序,将其推送到你所选择的注册服务器上,轻松地与他人分享–由于它是可自由再分配的–甚至可以将其部署到非红帽平台。由于它建立在红帽企业Linux上,UBI是一个可靠、安全和高性能的平台。
UBI是红帽的容器就绪的操作系统映像,允许你建立更小的映像,用于基于容器的系统。目前有如下4类UBI镜像:

  • Standard:提供了必要的运行机制和YUM存储库来构建、部署和共享基于UBI的容器。
  • Minimal:是一个UBI镜像,它只提供基于RHEL的轻量级镜像所需的基本要素。
  • Multi-service:是为旨在运行多个应用服务的容器镜像而设计的,它也包括systemd。
  • Micro:与红帽企业Linux 8.4一起发布,为边缘计算和其他远程应用提供最小的UBl足迹。

构建包含可独立运行的应用的容器镜像

下载基础UBI镜像

  1. 确保环境安装有buildah和podman工具。
$ yum install -y podman buildah
  1. 使用buildah命令下载适合运行独立应用的红帽ubi镜像到本地。
$ buildah from registry.access.redhat.com/ubi8/ubi
Getting image source signatures
Copying blob e45283d00526 done
Copying blob c51b1b38edbb done
Copying config 18b22de14a done
Writing manifest to image destination
Storing signatures
ubi-working-container
  1. 查看本地image,确认已经有ubi8镜像了。
$ buildah images
REPOSITORY                           TAG     IMAGE ID      CREATED         SIZE
registry.access.redhat.com/ubi8/ubi  latest  18b22de14a6f  7 days ago      234 MB
  1. 查看buildah下的容器,确认有名为ubi-working-container的容器。
$ buildah containers
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
ede6c61d04ca     *     18b22de14a6f registry.access.redhat.com/ub... ubi-working-container

说明:“buildah containers”等同于“buildah ps”或“buildah list”。
5. 查看运行的容器详细信息

$ buildah inspect ede6c61d04ca
{"Type": "buildah 0.0.1","FromImage": "registry.access.redhat.com/ubi8/ubi:latest","FromImageID": "18b22de14a6f0b26dd2cffb73a1f5980072ce4e81af759d83d551520e67d483b","FromImageDigest": "sha256:557f9b9c5508eaf4f1b6b8420df06a83a96f11a9a19b92f28e6b771186a558ca",
。。。
  1. 运行容器,查看容器内部的系统信息
$ buildah run ubi-working-container cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)

基于UBI镜像,构建新的应用镜像

  1. 查看容器内部的 yum repo配置。
$ buildah run ubi-working-container cat /etc/yum.repos.d/ubi.repo
[ubi-8-baseos]
name = Red Hat Universal Base Image 8 (RPMs) - BaseOS
baseurl = https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi8/8/$basearch/baseos/os
enabled = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
gpgcheck = 1
。。。(省略)
  1. 向本地容器ubi-working-container安装epel-release-latest-8.noarch.rpm包。
$ buildah run ubi-working-container -- yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                                       39 MB/s |  33 MB     00:00
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                                                    42 MB/s |  30 MB     00:00
Red Hat Universal Base Image 8 (RPMs) - BaseOS                                                             4.4 MB/s | 786 kB     00:00
Red Hat Universal Base Image 8 (RPMs) - AppStream                                                           39 MB/s | 7.4 MB     00:00
Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder                                                  183 kB/s |  15 kB     00:00
epel-release-latest-8.noarch.rpm                                                                            51 kB/s |  22 kB     00:00
Dependencies resolved.
===========================================================================================================================================Package                            Architecture                 Version                          Repository                          Size
===========================================================================================================================================
Installing:epel-release                       noarch                       8-10.el8                         @commandline                        22 kTransaction Summary
===========================================================================================================================================
Install  1 PackageTotal size: 22 k
Installed size: 32 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transactionPreparing        :                                                                                                                   1/1 Installing       : epel-release-8-10.el8.noarch                                                                                      1/1 Running scriptlet: epel-release-8-10.el8.noarch                                                                                      1/1 Verifying        : epel-release-8-10.el8.noarch                                                                                      1/1
Installed products updated.Installed:epel-release-8-10.el8.noarch                                                                                                             Complete!
  1. 确认rpm包是安装在UBI镜像中,而不是宿主机的rhel中。
$ rpm -q epel-release
package epel-release is not installed
  1. 在UBI容器ubi-working-container中安装应用moon-buggy
$ buildah run ubi-working-container -- yum -y install moon-buggy
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Extra Packages for Enterprise Linux Modular 8 - x86_64                                                     1.0 MB/s | 610 kB     00:00
Extra Packages for Enterprise Linux 8 - x86_64                                                              13 MB/s | 9.4 MB     00:00
Dependencies resolved.
===========================================================================================================================================Package                     Architecture           Version                         Repository                                        Size
===========================================================================================================================================
Installing:moon-buggy                  x86_64                 1.0.51-25.el8                   epel                                              81 k
Installing dependencies:alsa-lib                    x86_64                 1.2.4-5.el8                     rhel-8-for-x86_64-appstream-rpms                 471 kaudiofile                   x86_64                 1:0.3.6-23.el8                  epel                                             141 kesound-libs                 x86_64                 1:0.2.41-22.el8                 epel                                              84 kflac-libs                   x86_64                 1.3.2-9.el8                     rhel-8-for-x86_64-appstream-rpms                 217 klibogg                      x86_64                 2:1.3.2-10.el8                  rhel-8-for-x86_64-appstream-rpms                  31 kTransaction Summary
===========================================================================================================================================
Install  6 PackagesTotal download size: 1.0 M
Installed size: 2.7 M
Downloading Packages:
(1/6): audiofile-0.3.6-23.el8.x86_64.rpm                                                                   2.3 MB/s | 141 kB     00:00
(2/6): esound-libs-0.2.41-22.el8.x86_64.rpm                                                                521 kB/s |  84 kB     00:00
(3/6): moon-buggy-1.0.51-25.el8.x86_64.rpm                                                                 277 kB/s |  81 kB     00:00
(4/6): libogg-1.3.2-10.el8.x86_64.rpm                                                                      119 kB/s |  31 kB     00:00
(5/6): flac-libs-1.3.2-9.el8.x86_64.rpm                                                                    586 kB/s | 217 kB     00:00
(6/6): alsa-lib-1.2.4-5.el8.x86_64.rpm                                                                     1.3 MB/s | 471 kB     00:00
-------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                      905 kB/s | 1.0 MB     00:01
warning: /var/cache/dnf/epel-fafd94c310c51e1e/packages/audiofile-0.3.6-23.el8.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID 2f86d6a1: NOKEY
Extra Packages for Enterprise Linux 8 - x86_64                                                             1.6 MB/s | 1.6 kB     00:00
Importing GPG key 0x2F86D6A1:Userid     : "Fedora EPEL (8) <epel@fedoraproject.org>"Fingerprint: 94E2 79EB 8D8F 25B2 1810 ADF1 21EA 45AB 2F86 D6A1From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transactionPreparing        :                                                                                                                   1/1 Installing       : alsa-lib-1.2.4-5.el8.x86_64                                                                                       1/6 Running scriptlet: alsa-lib-1.2.4-5.el8.x86_64                                                                                       1/6 Installing       : libogg-2:1.3.2-10.el8.x86_64                                                                                      2/6 Installing       : flac-libs-1.3.2-9.el8.x86_64                                                                                      3/6 Installing       : audiofile-1:0.3.6-23.el8.x86_64                                                                                   4/6 Installing       : esound-libs-1:0.2.41-22.el8.x86_64                                                                                5/6 Installing       : moon-buggy-1.0.51-25.el8.x86_64                                                                                   6/6 Running scriptlet: moon-buggy-1.0.51-25.el8.x86_64                                                                                   6/6 Verifying        : audiofile-1:0.3.6-23.el8.x86_64                                                                                   1/6 Verifying        : esound-libs-1:0.2.41-22.el8.x86_64                                                                                2/6 Verifying        : moon-buggy-1.0.51-25.el8.x86_64                                                                                   3/6 Verifying        : flac-libs-1.3.2-9.el8.x86_64                                                                                      4/6 Verifying        : libogg-2:1.3.2-10.el8.x86_64                                                                                      5/6 Verifying        : alsa-lib-1.2.4-5.el8.x86_64                                                                                       6/6
Installed products updated.Installed:alsa-lib-1.2.4-5.el8.x86_64     audiofile-1:0.3.6-23.el8.x86_64    esound-libs-1:0.2.41-22.el8.x86_64    flac-libs-1.3.2-9.el8.x86_64   libogg-2:1.3.2-10.el8.x86_64    moon-buggy-1.0.51-25.el8.x86_64   Complete!
  1. 查看本地的容器镜像。当前只有ubi8容器。
$ podman images
REPOSITORY                           TAG     IMAGE ID      CREATED         SIZE
registry.access.redhat.com/ubi8/ubi  latest  18b22de14a6f  7 days ago      234 MB
  1. 将本地ubi-working-container容器转换名为moon-buggy的镜像。
$ buildah commit ubi-working-container moon-buggy
Getting image source signatures
Copying blob baedd15dd07e skipped: already exists
Copying blob 1e05587d4a9f skipped: already exists
Copying blob d487a9463f88 done
Copying config ff5e289069 done
Writing manifest to image destination
Storing signatures
ff5e28906909086dd354be1b0b7d9bff941f0705f1a2ec23c054d6f5dcba3a75
  1. 再次查看本地的容器镜像。当前已经有新的应用容器。
$ podman images
REPOSITORY                           TAG     IMAGE ID      CREATED         SIZE
localhost/moon-buggy                 latest  ff5e28906909  18 seconds ago  418 MB
registry.access.redhat.com/ubi8/ubi  latest  18b22de14a6f  7 days ago      234 MB
  1. 基于本地moon-buggy镜像,运行容器。
$ podman run -it moon-buggy /usr/bin/moon-buggy
  1. 在应用运行界面键入“q”可退出运行。
  Moon-Buggy version 1.0.51+esd, Copyright 2004 Jochen Voss <voss@seehuhn.de>Moon-Buggy comes with ABSOLUTELY NO WARRANTY; for details type 'w'.This is free software, and you are welcome to redistribute itunder certain conditions; type 'c' for details.MM     MM   OOOOO    OOOOO   NN     NM M   M M  O     O  O     O  N N    NM  M M  M  O     O  O     O  N  N   NM   M   M  O     O  O     O  N   N  NM       M  O     O  O     O  N    N NM       M   OOOOO    OOOOO   N     NNBBBBBB   U     U   GGGGG    GGGGG   Y     YB     B  U     U  G     G  G     G   Y   YBBBBBB   U     U  G        G          Y YB     B  U     U  G   GGG  G   GGG     YB     B  U     U  G     G  G     G    YBBBBBB    UUUUU    GGGGG    GGGGG   YYOmm(|)-(|)
####################################################################################################
####################################################################################################
y,SPC,RET:start game  q,n:quit  c:show copyright  w:show warranty  s:show scores  r,C-l:redraw
  1. 查看本地容器,确认包含“charming_neumann”容器。
$ buildah ps --all
CONTAINER ID  BUILDER  IMAGE ID     IMAGE NAME                       CONTAINER NAME
c8cc546ce9ba     *     18b22de14a6f registry.access.redhat.com/ub... ubi-working-container
c9961b90a70e           8050aac88b92 localhost/moon-buggy:latest      charming_neumann

构建以服务运行的应用的容器镜像

下载基础UBI镜像

  1. 下载适合运行后台服务的红帽ubi8镜像ubi-init到本地。可以看到本地容器名称为ubi-init-working-container。
$ buildah from registry.access.redhat.com/ubi8/ubi-init
Getting image source signatures
Copying blob c51b1b38edbb done
Copying blob 26cb90e4ae84 done
Copying blob e45283d00526 done
Copying config 9bbdcc2d3f done
Writing manifest to image destination
Storing signatures
ubi-init-working-container
  1. 向本地容器中安装httpd服务。
$ buildah run ubi-init-working-container -- yum -y install httpd
Updating Subscription Management repositories.
Unable to read consumer identity
Subscription Manager is operating in container mode.This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                                                       26 MB/s |  33 MB     00:01
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)                                                    28 MB/s |  30 MB     00:01
Red Hat Universal Base Image 8 (RPMs) - BaseOS                                                             5.4 MB/s | 786 kB     00:00
Red Hat Universal Base Image 8 (RPMs) - AppStream                                                           37 MB/s | 7.4 MB     00:00
Red Hat Universal Base Image 8 (RPMs) - CodeReady Builder                                                  158 kB/s |  15 kB     00:00
Dependencies resolved.
  1. 允许容器中的httpd服务在容器启动后自动运行。
buildah run ubi-init-working-container -- systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
  1. 将index1.html复制到容器中的httpd默认页面。
$ cat << EOF > index1.html
index page 1
EOF
$ buildah copy ubi-init-working-container index1.html /var/www/html/index.html
c03382e8c990233b6ac7ccbef803c6556421825e8e400a0dea41826940713ac7
  1. 配置容器对外暴露80端口。
$ buildah config --port 80 --cmd "/usr/sbin/init" ubi-init-working-container
  1. 将本地容器发布成名为el-httpd1的容器镜像。
$ buildah commit ubi-init-working-container el-httpd1
Getting image source signatures
Copying blob baedd15dd07e skipped: already exists
Copying blob 1e05587d4a9f skipped: already exists
Copying blob 5f7bc1e8ff4c skipped: already exists
Copying blob 2a8794f0ce87 [--------------------------------------] 0.0b / 0.0b
Copying config 7d309d19db done
Writing manifest to image destination
Storing signatures
7d309d19dbcf443c4840848eaf974b6c9d36b6b816d3aaedaea1698ac2134399
  1. 查看本地容器镜像,其中包含上一步发布的el-httpd1 镜像。
$ podman images
REPOSITORY                                TAG     IMAGE ID      CREATED        SIZE
localhost/el-httpd1                       latest  7d309d19dbcf  4 minutes ago  414 MB
registry.access.redhat.com/ubi8/ubi-init  latest  9bbdcc2d3f32  7 days ago     251 MB
  1. 运行el-httpd1镜像,并将容器80端口映射到宿主机80端口。
$ podman run -d -p 80:80 el-httpd1
d36f80196646541f2538a56bcd85fb345314847b900ea6f6b3b0a9035dc69cb6
  1. 查看本地运行的容器
$ podman ps
CONTAINER ID  IMAGE                       COMMAND         CREATED         STATUS             PORTS               NAMES
d36f80196646  localhost/el-httpd1:latest  /usr/sbin/init  29 seconds ago  Up 28 seconds ago  0.0.0.0:80->80/tcp  trusting_hermann
  1. 查看el-httpd1容器的信息。
$ buildah inspect localhost/el-httpd1
{"Type": "buildah 0.0.1","FromImage": "localhost/el-httpd1:latest","FromImageID": "7d309d19dbcf443c4840848eaf974b6c9d36b6b816d3aaedaea1698ac2134399","FromImageDigest": "sha256:fbfb75636edd40965aaffc07b6627033ee3a3872ebc92d5fdb755e92176ff551",
。。。
  1. 确认可以访问容器的httpd服务。
$ curl http://localhost

12.停掉所有运行的容器 。

$ podman stop -a
d36f80196646541f2538a56bcd85fb345314847b900ea6f6b3b0a9035dc69cb6

从头开始创建一个应用镜像

  1. 执行buildah命令,从scratch创建镜像。
$ buildah from scratch
working-container
  1. 获取当前工作容器的mount目录。
$ scratchmnt=$(buildah mount working-container)
$ echo ${scratchmnt}
/var/lib/containers/storage/overlay/f8fa6992ba9d780f45dfa476235d3da5dc98deba7f49cee928b448a7bbfe52b6/merged
  1. 确认工作容器mount的宿主机目录中没有任何文件。
$ ls -l ${scratchmnt}
total 0
  1. 为当前容器安装httpd服务,安装在“${scratchmnt}”中。
$ yum install --installroot ${scratchmnt} httpd --releasever 8 --setopt=module_platform_id="platform:el8" -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)               2.4 MB/s | 7.0 MB     00:02
Red Hat Enterprise Linux 8 for x86_64 - BaseOS (RPMs)                  1.3 MB/s | 3.7 MB     00:02
Red Hat Enterprise Linux 8 for x86_64 - Supplementary (RPMs)            23 kB/s |  78 kB     00:03
Last metadata expiration check: 0:00:01 ago on Fri 17 May 2019 03:41:34 PM EDT.
Dependencies resolved.
====================================================================================================================Package                 Arch   Version                                      Repository                         Size
====================================================================================================================
Installing:httpd                   x86_64 2.4.37-11.module+el8.0.0+2969+90015743      rhel-8-for-x86_64-appstream-rpms   1.4 M<< OUTPUT ABRIDGED >>Complete!
  1. 设置可以在容器启动后自动运行httpd服务。
$ chroot ${scratchmnt} systemctl enable httpd
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
  1. 复制index2.html文件到容器中的/var/www/html/index.html文件。
$ cat << EOF > index2.html
index page 2
EOF
$ cp index2.html ${scratchmnt}/var/www/html/index.html
  1. 再次查看容器对应的挂载的宿主机目录。
$ ls -l ${scratchmnt}
total 12
lrwxrwxrwx.  1 root root    7 Apr 23  2020 bin -> usr/bin
dr-xr-xr-x.  4 root root   30 Jun  3 16:17 boot
drwxr-xr-x.  2 root root   18 Jun  3 16:17 dev
drwxr-xr-x. 53 root root 4096 Jun  3 16:18 etc
drwxr-xr-x.  2 root root    6 Apr 23  2020 home
lrwxrwxrwx.  1 root root    7 Apr 23  2020 lib -> usr/lib
lrwxrwxrwx.  1 root root    9 Apr 23  2020 lib64 -> usr/lib64
drwxr-xr-x.  2 root root    6 Apr 23  2020 media
drwxr-xr-x.  2 root root    6 Apr 23  2020 mnt
drwxr-xr-x.  2 root root    6 Apr 23  2020 opt
dr-xr-xr-x.  2 root root    6 Apr 23  2020 proc
dr-xr-x---.  2 root root    6 Apr 23  2020 root
drwxr-xr-x. 13 root root  162 Jun  3 16:18 run
lrwxrwxrwx.  1 root root    8 Apr 23  2020 sbin -> usr/sbin
drwxr-xr-x.  2 root root    6 Apr 23  2020 srv
dr-xr-xr-x.  2 root root    6 Apr 23  2020 sys
drwxrwxrwt.  2 root root    6 Apr 23  2020 tmp
drwxr-xr-x. 12 root root  144 Jun  3 16:17 usr
drwxr-xr-x. 20 root root 4096 Jun  3 16:18 var
  1. 卸载容器的文件系统。
$ buildah unmount working-container
66fa1c4c764491a77cdf7b1b16a646dbf17dbe8925ff9a1b1e8866aad46fd3e8
  1. 设置httpd服务运行在容器的80端口。
$ buildah config --port 80 --cmd "/usr/sbin/init" working-container
  1. 将本地容器发布成名为el-httpd2的容器镜像。
$ buildah commit working-container el-httpd2
Getting image source signatures
Copying blob 9b095605ad72 done
Copying config 098c1605a7 done
Writing manifest to image destination
Storing signatures
098c1605a7cbe3a1cdd3a0e28fc3a19d996e8fba26656834caf4a30c22f62fd3
  1. 查看本地容器镜像,确认已经有el-httpd2镜像了。
$ podman images
REPOSITORY                                TAG     IMAGE ID      CREATED         SIZE
localhost/el-httpd2                       latest  098c1605a7cb  24 seconds ago  657 MB
localhost/el-httpd1                       latest  9c105d0cc696  5 minutes ago   414 MB
registry.access.redhat.com/ubi8/ubi-init  latest  9bbdcc2d3f32  7 days ago      251 MB
  1. 根据el-httpd2镜像运行容器。
$ podman run -d -p 80:80 el-httpd2
bb0f61fe23ffc9ea60be24f9c2f09db9b4794a5d60e9f4989663b05fa9edb6f8
  1. 查看运行容器的信息。
$ podman ps
CONTAINER ID  IMAGE                       COMMAND         CREATED       STATUS                     PORTS               NAMES
bb0f61fe23ff  localhost/el-httpd2:latest  /usr/sbin/init  1 second ago  Up Less than a second ago  0.0.0.0:80->80/tcp  cranky_haslett
  1. 查看el-httpd2镜像的信息。
$ buildah inspect localhost/el-httpd2
  1. 确认可以访问容器的httpd服务。
$ curl http://localhost
  1. 停掉所有运行的容器 。
$ podman stop -a

在 S2I 中使用UBI镜像

以下操作需要提前登录OpenShift。

  1. 执行命令,根据基于UBI8的openjdk-11构建quarkus-quickstarts应用。
$ oc new-app --context-dir=getting-started --name=quarkus-quickstart registry.access.redhat.com/ubi8/openjdk-11~https://github.com/quarkusio/quarkus-quickstarts.git#1.13.3.Final
  1. 根据service生成route。
$ oc expose svc/quarkus-quickstart
  1. 确认应用可以访问。
$ export URI="http://$(oc get route | grep quarkus-quickstart | awk '{print $2}')"
$ curl $URI/hello/greeting/quarkus
hello quarkus

参考

https://access.redhat.com/documentation/zh-cn/red_hat_enterprise_linux/8/html-single/building_running_and_managing_containers/index

OpenShift 4 - 用Buildah定制UBI容器镜像相关推荐

  1. 如何使用 Buildah 构建容器镜像

    Project Atomic 通过他们在 Open Container Initiative(OCI)上的努力创造了一个名为 Buildah 的伟大工具.Buildah 能帮助创建.构建和更新,它支持 ...

  2. 利用Podman和Buildah构建容器镜像

    这是有关构建容器镜像的一系列博客文章中的第二篇.该系列从<未来我们如何构建容器镜像?>开始.该文章探讨了自Docker首次发布以来构建镜像的变化以及如何克服使用Dockerfile的诸多限 ...

  3. Docker 定制容器镜像的2种方法

    一.需求 由于在测试环境中使用了docker官网的centos 镜像,但是该镜像里面默认没有安装ssh服务,在做测试时又需要开启ssh.所以上网也查了查资料.下面详细的纪录下.在centos 容器内安 ...

  4. RHEL 8 - 用OpenSCAP工具对容器镜像进行漏洞安全合规扫描,并修复

    <OpenShift 4.x HOL教程汇总> 已在 RHEL 8.4 上验证 本文的前置条件:RHEL8 - 配置基于安装 ISO 文件的 YUM Repo 文章目录 准备环境 扫描容器 ...

  5. 利用Img构建容器镜像

    本系列文章一共6篇,本文是该系列的第3篇文章,前2篇文章如下: <未来我们如何构建容器镜像?> <利用Podman和Buildah构建容器镜像> Img[1]是一个开源项目,由 ...

  6. Dockerfile构建容器镜像 - 运维笔记

    在Docker的运用中,从下载镜像,启动容器,在容器中输入命令来运行程序,这些命令都是手工一条条往里输入的,无法重复利用,而且效率很低.所以就需要一 种文件或脚本,我们把想执行的操作以命令的方式写入其 ...

  7. 利用Serverless Kubernetes和Kaniko快速自动化构建容器镜像

    前言: 在云原生时代中,容器镜像是一切应用分发的基础载体,除了dockerhub作为流行的镜像仓库外,各大公有云厂商也都提供了功能丰富镜像仓库服务,如ACR(Aliyun Container Regi ...

  8. GCP发布Kaniko:在非特权容器和Kubernetes中构建容器镜像的工具

    \ 看新闻很累?看技术新闻更累?试试下载InfoQ手机客户端,每天上下班路上听新闻,有趣还有料! \ \\ Google发布了"Kaniko",一种用于在未授权容器或Kuberne ...

  9. 使用Trove的integration定制化trove镜像

    注意: 从V版开始,Trove支持在guest instance中将数据库服务作为docker容器运行,所以不需要再为不同的数据库服务维护多个的镜像,这就意味着可以在V版的镜像中看到MYSQL和Mar ...

最新文章

  1. Python:matplotlib实践:直方图、散点图展示、变色、线条变换、点样式变换、添加名称、设置横纵轴范围、在一张图上显示多条线
  2. import caffe失败 No module named caffe
  3. 带有示例的Python File readline()方法
  4. window.print 点击取消后再次打印无效_教程 | 图书馆自助复印打印机使用方法
  5. 互联网日报 | 天猫双11成交额4982亿;京东双11下单金额2715亿;百度成立短视频业务部...
  6. 矩阵的秩与行列式的几何意义
  7. ASP.NET MVC Html.BeginForm用法1
  8. vue: table制作发货单表格并打印
  9. RabbitMQ高可用--Quorum Queue(仲裁队列)的原理
  10. 【数仓】浅谈数仓建模的方法
  11. 目前重庆橱柜市场分析
  12. 手动清除jwgkvsq.vmx病毒
  13. STM32之光照强度(BH1750)
  14. 《Java程序性能优化》读书笔记
  15. 字节、字、位、比特,这四者之间的关系
  16. Oracle Grant详解
  17. java火车票订票系统 论文_毕业设计(论文)-基于JAVA的火车票售票系统.doc
  18. PostgreSql 分区表
  19. 【无标题】求各大ios shsh版本!能不能给大哥?
  20. 命令行操作之函数绘图(MATLAB基础)

热门文章

  1. 一主多备几影响 oracle,Oracle 10g 一主多备的搭建技巧
  2. 2dpca的matlab代码,2DPCA人脸识别的matlab代码
  3. deep linux 看视频卡,在Deepin 20等Linux系统下用Chrome看虎牙直播经常卡的处理
  4. 游戏大魔王少不了王者荣耀壁纸图片
  5. 每年圣诞海报是躲不掉的,趁时间还来得及,看看这里PSD分层模板
  6. 移动端引导页UI设计临摹模板,ui设计师进阶必备
  7. 平面设计师如何利用图片素材提升工作效率
  8. 请简述gouraud光照模型_OpenGL ES for Android(冯氏光照)
  9. 亚麻纤维截面形态_纺织品知识点--纺织纤维的分类get
  10. Django Ajax发送请求使用方法