(I am new to docker so patience please) NOTE: I DO NOT USE VOLUMES so the answers in this question do not apply
Why is docker not committing these changes?
If I do manual changes (like docker cp ... or docker exec ... or even inside the container) those stick and are committed just fine. I spent two full days on this, any help is appreciated.
docker-compose.yml:
version: '3.8'
networks:
frontend:
backend:
services:
mysql_db:
container_name: mysql
image: mysql_me:latest
command: mysqld --innodb-buffer-pool-size=20M
restart: on-failure
environment:
MYSQL_DATABASE: 'joomla'
MYSQL_USER: 'joomla_user'
MYSQL_PASSWORD: 'JPassword'
MYSQL_ROOT_PASSWORD: 'RPassword'
MYSQL_ROOT_HOST: '%'
ports:
- '3306:3306'
expose:
- '3306'
networks:
- backend
joomla:
container_name: joomla
image: joomla_me:latest
restart: always
ports:
- "443:443"
- "8080:80"
environment:
JOOMLA_DB_HOST: 'mysql_db:3306'
JOOMLA_DB_USER: 'joomla_user'
JOOMLA_DB_PASSWORD: 'JPassword'
JOOMLA_DB_NAME: 'joomla'
links:
- mysql_db:3306
networks:
- frontend
- backend
depends_on:
- mysql_db
Like David Maze pointed out, the original images I am building upon are already using volumes so my custom images are "inheriting" those volumes - even though I am not explicitly declaring any volumes in my own yaml file. Couldn't find that documented anywhere I searched, so I hope this will help other beginners.