To provide additional explanation on what I would expect from Docker documentation, you can see here an example for the Flask project:
https://flask.palletsprojects.com/en/2.2.x/quickstart/
The “Externally Visible Server” section explicitly provides a set of instructions regarding what I should do to have an externally visible server, and what to expect, instead of going with “this is not flask specific”. I would expect the docker composer documentation to provide something similar.
In fact, doing that on the exact same machine leads to the Flask app being visible externally. Docker apps, however, are not externally visible with similar setup.
Moreover, Docker Compose worked fine with the snap version of Docker. I had some issues with that later on and had to uninstall and install again, and then I preferred to follow the official installation instructions for ubuntu. Unfortunately this forum doesn’t allow me to add the link in here.
So I guess my docker version and info would be the same as anyone following those instructions. The docker version gives:
"Client: Docker Engine - Community
Version: 23.0.2
API version: 1.42
Go version: go1.19.7
Git commit: 569dd73
Built: Mon Mar 27 16:16:27 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 23.0.2
API version: 1.42 (minimum version 1.12)
Go version: go1.19.7
Git commit: 219f21b
Built: Mon Mar 27 16:16:27 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.19
GitCommit: 1e1ea6e986c6c86565bc33d52e34b81b3e2bc71f
runc:
Version: 1.1.4
GitCommit: v1.1.4-0-g5fd4c4d
docker-init:
Version: 0.19.0
GitCommit: de40ad0"
and the docker info gives:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.4
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.17.2
Path: /usr/libexec/docker/cli-plugins/docker-compose
scan: Docker Scan (Docker Inc.)
Version: v0.23.0
Path: /usr/libexec/docker/cli-plugins/docker-scan
Server:
Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 3
Server Version: 23.0.2
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: systemd
Cgroup Version: 2
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 1e1ea6e986c6c86565bc33d52e34b81b3e2bc71f
runc version: v1.1.4-0-g5fd4c4d
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
cgroupns
Kernel Version: 5.19.0-35-generic
Operating System: Ubuntu 22.10
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.763GiB
Name: ubuntu-s-1vcpu-512mb-10gb-nyc1-01
ID: 3b4736ac-36ef-49c9-b7b1-9eb4252aecbd
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
My docker-compose file is as simple as possible:
services:
frontend:
build: ./frontend
ports:
- 3000:3000
with a React frontend and, as stated, it works fine for the localhost. I have also tried:
services:
frontend:
build: ./frontend
ports:
- 0.0.0.0:3000:3000
but nothing changed.