docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bee4e3e395d5 526214b8c3f8 "bash" 58 seconds ago Up 57 seconds 0.0.0.0:80->8080/tcp, :::80->8080/tcp admiring_golick
7a00e9e9cca8 6a29263a9712 "docker-entrypoint.s…" 39 minutes ago Up 39 minutes 6379/tcp agitated_curie
62b9417cafb4 mariadb:10.6 "docker-entrypoint.s…" 2 months ago Up 13 hours (healthy) 3306/tcp mariadb-database
Yes, docker is very different from VMs. The ideal image is one that is slimmed down to only include the bare necessities for the main process the container is running to function. Thus luxuries like ping are usually not installed.
If you need to do troubleshooting the network, you need to run a different container like one from the nicolaka/netshoot image in the original container’s network namespace, but needing to do this is rare.
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
redis 6.2-alpine 6a29263a9712 6 weeks ago 27.5MB
frappe/erpnext v14.30.6 526214b8c3f8 6 weeks ago 1.6GB
mariadb 10.6 6d86fc66ebd1 2 months ago 380MB
I started frappe-erpnext
docker run -dit -p 80:8080 526214b8c3f8 bash
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bee4e3e395d5 526214b8c3f8 “bash” 2 hours ago Up 2 hours 0.0.0.0:80->8080/tcp, :::80->8080/tcp admiring_golick
7a00e9e9cca8 6a29263a9712 “docker-entrypoint.s…” 3 hours ago Up 3 hours 6379/tcp agitated_curie
62b9417cafb4 mariadb:10.6 “docker-entrypoint.s…” 2 months ago Up 16 hours (healthy) 3306/tcp mariadb-database
Attach to the container:
docker attach admiring_golick
frappe@bee4e3e395d5:~/frappe-bench$ bench version
erpnext 14.33.2
frappe 14.43.1
@Peer I’m trying to use curl on the host to see if the frappe interface can be accessed like so:
curl 172.17.0.2:8080
curl: (7) Failed to connect to 172.17.0.2 port 8080: Connection refused
@revant_one i will use the --name flag in the future, my apologies (and many thanks).
@smino, you will not get the frappe web interface this way just starting up a container from the frappe/erpnext image. The only service you could use curl with on that is the werkzeug server on port 8000/tcp.
Instead, you will need to have all the services running together in a docker compose. Then you can curl the frontend container’s nginx at 8080/tcp. See Single Server Example for more info on how to get started on that.
Again, this is a learning experience for me and your help is greatly appreciated.
I skipped Traefik for this exercise and have three containers: frappe, redis and mariadb, their names were generated automatically except for the frappe one.
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
325b3dfeee25 526214b8c3f8 “bash” 24 hours ago Up 24 hours 0.0.0.0:80->8080/tcp, :::80->8080/tcp frappe
7a00e9e9cca8 6a29263a9712 “docker-entrypoint.s…” 34 hours ago Up 34 hours 6379/tcp agitated_curie
62b9417cafb4 mariadb:10.6 “docker-entrypoint.s…” 2 months ago Up 46 hours (healthy) 3306/tcp mariadb-database
docker exec -it agitated_curie ps -a
PID USER TIME COMMAND
1 redis 1:47 redis-server *:6379
35 root 0:00 ps -a
docker top mariadb-database
UID PID PPID C STIME TTY TIME CMD
systemd+ 3091 3069 0 Sep22 ? 00:00:56 mariadbd --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --skip-character-set-client-handshake --skip-innodb-read-only-compressed
A few debugging things I’ve tried to see if the containers are running:
docker exec -it mariadb-database mysql
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)
docker exec -e “TERM=xterm” -it frappe service nginx status
nginx is running.
This is not urgent or a production environment and can be scrapped and started from scratch at any time. I’m wondering if it is simply inter-container or host to container networking that is the problem.
I think what @revant_one was getting at was that if you follow the Single Server example, you would have a docker compose file that spins up about 13 containers. If you skip traefik (which is fine) then 12 containers. After the configurator finishes its job, it shuts down which would leave 11. But you only have 3. So something isn’t right there. And the containers would have been automatically named something like frappe_docker-frontend-1, frappe_docker-db-1, etc. as opposed to the random names you are getting by trying to spin them up with docker run.
If you follow the guide exactly, step by step, you will end up with (1) a docker-compose.yml file, (2) a completely functional (but unconfigured) erpnext “server”, (3) a frontend you can access with your web browser, and you will also have (4) something that can be properly troubleshot if there are problems.
I learned how to run ERPNext via docker thanks to learning through that guide, and I’m sure I’m not the only one, so feel free to ask any questions about it and someone will be able to answer.
After a re-do, I’ve managed to get things a little closer to as they should be:
docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ba109ff30c96 frappe/erpnext:v14.30.6 “nginx-entrypoint.sh” About an hour ago Up About an hour erpnext-one-frontend-1
914395cfaa63 frappe/erpnext:v14.30.6 “bench worker --queu…” About an hour ago Up About an hour erpnext-one-queue-long-1
18ca4ad518bc frappe/erpnext:v14.30.6 “bench schedule” About an hour ago Up About an hour erpnext-one-scheduler-1
cd855ece0afe frappe/erpnext:v14.30.6 “/home/frappe/frappe…” About an hour ago Up About an hour erpnext-one-backend-1
a0c3b8315c8f frappe/erpnext:v14.30.6 “bench worker --queu…” About an hour ago Up About an hour erpnext-one-queue-default-1
f8606f9dbbf7 frappe/erpnext:v14.30.6 “node /home/frappe/f…” About an hour ago Up About an hour erpnext-one-websocket-1
452f302f21e5 frappe/erpnext:v14.30.6 “bench worker --queu…” About an hour ago Up About an hour erpnext-one-queue-short-1
2015a429cb33 redis:6.2-alpine “docker-entrypoint.s…” About an hour ago Up About an hour 6379/tcp erpnext-one-redis-queue-1
94c11e797f61 redis:6.2-alpine “docker-entrypoint.s…” About an hour ago Up About an hour 6379/tcp erpnext-one-redis-cache-1
76c572e6ccb5 redis:6.2-alpine “docker-entrypoint.s…” About an hour ago Up About an hour 6379/tcp erpnext-one-redis-socketio-1
966a897c9b99 mariadb:10.6 “docker-entrypoint.s…” About an hour ago Up About an hour (healthy) 3306/tcp mariadb-database
Not sure where I would find the web interface on the frontend or if its not configured correctly:
docker compose --project-name erpnext-one exec frontend ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
204: eth0@if205: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:13:00:0b brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.19.0.11/16 brd 172.19.255.255 scope global eth0