0

我从中了解到图像在 中获得标签是正常,但我不明白为什么图像大小与标记的大小不同。我找不到任何关于此的信息,所以我求助于在 stackoverflow 上发布一个问题。谁能解释一下?<none>docker stack

mysql                         <none>              a8a59477268d        2 weeks ago         445MB
mysql                         8.0                 c01d431b7858        10 months ago       266MB
phpmyadmin/phpmyadmin         <none>              7af57eae1e90        3 weeks ago         163MB
phpmyadmin/phpmyadmin         latest              3405a88394e3        9 months ago        111MB

这是 docker-stack.yml 文件。

version: "3"

services:

  server:
    image: "com:latest"
    deploy:
      replicas: 3
      update_config:
        parallelism: 1
        delay: "10s"
        monitor: "10s"
        failure_action: rollback
      resources:
        limits:
          cpus: "0.25"
          memory: 50M
        reservations:
          cpus: "0.25"
          memory: 25M
    ports:
      - "80:80"
    links:
      - db
    networks:
      web:
    restart: always

  db:
    image: "mysql:8.0"
    deploy:
      mode: global
      resources:
        limits:
          cpus: "0.25"
          memory: 100M
        reservations:
          cpus: "0.25"
          memory: 20M
    networks:
      web:
    volumes:
      - db:/var/lib/mysql
    env_file: ./db/.env

  pma:
    image: "phpmyadmin/phpmyadmin:latest"
    env_file: ./db/.env
    networks:
      web:
    links:
      - db
    ports:
      - "8081:80"

networks:
  web:

volumes: 
  db:

顺便说一下,这种配置不起作用。我正在学习 docker swarm 及其配置。

4

0 回答 0