base image 里会装,你这个自定义的 image 不是基于 base image 构建的吧
devops 自定义jenkins agent node docker build 异常
- 已编辑
# docker run -it kubespheredev/builder-base:v3.1.0 envsubst -V
envsubst (GNU gettext-runtime) 0.19.8.1
Copyright (C) 2003-2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Bruno Haible.
我试了下,原生带的。 你用这个 配置,casc 对应 configmap 里找到对应的 image id,进去看下,有 envsubst 这个 命令吗
- 已编辑
qweqe417 我试了下这个 image,是没有装 envsubst
docker run --network=host -it node:18.13.0 bash
root@node1:/# envsubst
bash: envsubst: command not found
root@node1:/# apt-get update
Get:1 http://deb.debian.org/debian bullseye InRelease [116 kB]
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Get:4 http://deb.debian.org/debian bullseye/main amd64 Packages [8183 kB]
Get:5 http://deb.debian.org/debian-security bullseye-security/main amd64 Packages [228 kB]
Get:6 http://deb.debian.org/debian bullseye-updates/main amd64 Packages [14.6 kB]
Fetched 8634 kB in 10s (833 kB/s)
Reading package lists... Done
root@node1:/# apt install gettext-base
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
gettext-base
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 175 kB of archives.
After this operation, 675 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 gettext-base amd64 0.21-4 [175 kB]
Fetched 175 kB in 1s (128 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package gettext-base.
(Reading database ... 22790 files and directories currently installed.)
Preparing to unpack .../gettext-base_0.21-4_amd64.deb ...
Unpacking gettext-base (0.21-4) ...
Setting up gettext-base (0.21-4) ...
root@node1:/# env
env envsubst
root@node1:/# envsubst -V
envsubst (GNU gettext-runtime) 0.21
Copyright (C) 2003-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Bruno Haible.
你可以试试在 Dockerfile 中,装上这个 gettext-base
1 年 后
qweqe417 自定义nodejs镜像,有几种方式? 是要基于官方的base镜像吗
YyudongK零S
yongpanyan 是否要基于 base 镜像,可以自己决定;base 镜像安装了一些命令,如果不基于 base 镜像,自己需要的命令需要在自定义的镜像里安装;
1 个月 后
qweqe417 你构建node 18.13.0的Dockerfile文件,可以发出来一下看看吗
YyudongK零S
yongpanyan 关于自定义 agent ,可以参考下这个帖子 :devops工程如何升级node.js