Docker: upgrade to 'node:20-alpine' image Browse files Loading branch information Tibz-Dankan committed Mar 24, 2024 1 parent 12850b3 commit cd230d5 Showing 1 changed file with 1 addition and 1 deletion. Whitespace Ignore whitespace Split Unified 2 changes: 1 addition & 1 d...
Bumps the node docker images versions Update the value of the node docker image in the 'Using Docker with Pipeline' documentation 1 file(s) updated with "${1}node:20.10.0-alpine3.19${3}": * content/doc/book/pipeline/docker.adoc
最新的node镜像就是基于Debian 10 buster构建的。 image的体积上, alpine几乎比默认镜像小10倍。即便缩减后的slim,也少一半。 再来看image体积重要不重要。大的image下载需要花时间,需要占用磁盘空间。思考一下,官方镜像近1g,这个磁盘空间还是有的。至于下载时间,docker分层缓存机制可以使得我们只要下载一次即可。也是可...
您可以在 Dockerfile 中运行whoami来检查这一点。 代码语言:shell 复制 RUNecho"whoami:$(whoami)"# <--- whoami: root 在node 和其他一些镜像中(包括 Alpine 基础镜像),我们有一个名为 node 的用户,我们可以使用它代替 root,权限更少。我们应该将此用户添加到镜像中,并尽可能使用它代替 root。 代码语言:sh...
docker Alpine 编译安装node.js的dockerfile文件 dockerfile FROM alpine# FROM arm64v8/alpineENV NODE_VERSION 16.12.0 RUN sed -i's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g'/etc/apk/repositories RUN sed -i's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g'/etc/apk/repositories...
这样build 出来的 image 最终是 1G 左右,用户可以直接 pull 就直接跑的。这个体积算大吗,除了自带的 node、Debian环境没有引入其他的包甚至 node_modules。再体积方面,可以用 node:16-alpine 这个 image 继续做优化,apline 是最小化的Linux镜像了(大概),整个 image 只有 200M 左右,应经测试,用 apline 构建出来...
docker.io/library/node:latest [root@dex ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE node latest 2af77b226ea7 9 days ago 934MB [root@dex ~]# 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16.
Next, create an empty file called “Dockerfile”: touch Dockerfile Use your favorite text editor to open the Dockerfile. You’ll then need to define your base image. Accordingly, ensure that you’re using the Long Term Support (LTS) version of Node.js, and the minimal alpine image type...
...nginx:image:nginx:1.19.8-alpinerestart:alwaysports:-3000:80volumes:-./default.conf:/etc/nginx/conf.d/default.conf:ro-./cache:/data/nginx/cache:rw... 在完成 Nginx 缓存功能配置后,再次请求相同的公式地址若干次,并对请求结果进行观察。
[root@iZ28uvczcf6Z LittleFileServer]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE node-lfs-official v1 5a5da4c52c1756seconds ago687.8MB node-lfs v2 cda2998a607f19hours ago82.74MB ubuntu16.04dd0ff4f609fa23hours ago168.4MB node7.3.0-alpine d0a6661914f48days ago54.65MB ...