Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
verdaccio:
image: verdaccio/verdaccio:6.0.1
image: verdaccio/verdaccio:6.0.2
container_name: ${CONTAINER_NAME}
restart: always
networks:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这段代码是创建一个叫做 Verdaccio 的镜像,然后把此镜像名称设置为 Docker 容器的网络名字和标识符。主要的问题是没有指定版本号(如:6.0.1)。

此外,在 networks: 部分添加了两个挂载标签,但是实际操作中通常不会在镜像标签部分使用这个方法。另外代码格式不规范,请确保所有的单行注释都被正确地嵌入到代码行之间。

以下是对这些修改后的建议或改进:

services:

  # ...
  
  networks:
    # ...

如果需要更新Verdaccio图像到最新版本,可以在命令后面加上版本号:
verdaccio --version=6.xx
这样可以立即获取并应用新版本镜像。

Expand Down