sixeyed / diamol

Code samples for the book "Learn Docker in a Month of Lunches"
https://www.manning.com/books/learn-docker-in-a-month-of-lunches
Creative Commons Attribution Share Alike 4.0 International
516 stars 277 forks source link

ch07 exercises todo-list docker-compose network.external.name is deprecated #59

Open ericli0815 opened 1 year ago

ericli0815 commented 1 year ago

Exercise I bought a Chinese-traditional version book, so I think the page number does not work here. It is exercise 7.1: Docker compose to run todo-list.

Problem After type docker-compose up the message are

docker-compose : time="2023-04-05T16:36:22+08:00" level=warning msg="network app-net: network.external.name is deprecated. Please set n etwork.name with external: true"

Docker version

Client: Cloud integration: v1.0.31 Version: 20.10.23 API version: 1.41 Go version: go1.18.10 Git commit: 7155243 Built: Thu Jan 19 17:43:10 2023 OS/Arch: windows/amd64 Context: default Experimental: true

Server: Docker Desktop 4.17.0 (99724) Engine: Version: 20.10.23 API version: 1.41 (minimum version 1.12) Go version: go1.18.10 Git commit: 6051f14 Built: Thu Jan 19 17:32:04 2023 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.6.18 GitCommit: 2456e983eb9e37e47538f59ea18f2043c9a73640 runc: Version: 1.1.4 GitCommit: v1.1.4-0-g5fd4c4d docker-init: Version: 0.19.0 GitCommit: de40ad0

Code version

commit 71384f8c09a8e0b3867a2c73ae09549774a21e85 Author: Elton Stoneman elton@sixeyed.com Date: Fri Mar 5 15:43:14 2021 +0000

Bump Apache versions

Additional context Add any other context about the problem here.

ericli0815 commented 1 year ago

I fixed it with the changes below:

networks:
  app-net:
    name: nat
    external: true