从任何地方在 Oracle 云上使用 Wallabag 实例 运行

Use Wallabag instance running on Oracle cloud from anywhere

我正在尝试 运行 Free-Oracle-Cloud 层上的 Wallabag 实例。

Oracle 云 VM 给了我一个 IP 地址:A.B.C.D

我的 docker-compose.yml 看起来像:

version: "3"

services:
  app:
    image: wallabag/wallabag
    container_name: wallabag
    restart: unless-stopped
    healthcheck:
      test:
       [
          "CMD",
          "wget",
          "--no-verbose",
          "--tries=1",
          "--spider",
          "http://localhost",
       ]
      interval: 1m
      timeout: 3s
  environment:
      - SYMFONY__ENV__DOMAIN_NAME=http://127.0.0.1:8012
      - SYMFONY__ENV__SERVER_NAME="My Wallabag Instance"
  ports:
      - 127.0.0.1:8012:80
  volumes:
      - ./data:/var/www/wallabag/data
      - ./images:/var/www/wallabag/web/assets/images

之后我运行: docker-compose up -d

查看状态:docker ps -a | grep wallabag

输出:4fcadf00db88 wallabag/wallabag "/entrypoint.sh wall…" 9 seconds ago Restarting (1) 1 second ago wallabag

但问题是我无法从互联网访问 Wallabag 服务。我尝试将 127.0.0.1 替换为我的 IP 地址 A.B.C.D

错误:

ERROR: for wallabag Cannot start service app: driver failed programming external connectivity on endpoint wallabag (557e62f6b481d821cd3228a98deaa9cf4e723f0c8ee1ce621bf13): Error starting userland proxy: listen tcp4 A.B.C.D:8012: bind: cannot assign requested address

我们将不胜感激。

  environment:
      - SYMFONY__ENV__DOMAIN_NAME=http://A.B.C.D:8012
      - SYMFONY__ENV__SERVER_NAME="My Wallabag Instance"
  ports:
      - 8012:80

这应该有效