I've noticed that the docker-mysql folder is simply a Dockerfile which specifies a base image. This is exactly the same as specifying the image in the docker-compose.yml.
I'm just curious as to why you 'build' this dockerfile instead of just specifying the base image.
db:
container_name: ${DOCKER_PREFIX}_db
# image: mysql:8.0
# image: mysql:5.7
# For ARM (M1) Mac
# You need to select an image that has an OS/ARCH of arm64/v8 from
# https://hub.docker.com/_/mysql/tags
# On 2022-10-06 I switched the default mysql image to the oracle one which looks like it is
# built for both AMD and ARM architectures and should compile for all platforms
# previously, some had reported using FROM mysql/mysql-server:5.7.28 for M1 macs.
image: mysql:8.0-oracle
# environment:
# user: ${APACHE_RUN_USER_ID}
env_file: ./.env
restart: always
cap_add:
- SYS_NICE # CAP_SYS_NICE
volumes:
- ${MYSQL_DIR}:/var/lib/mysql
- ${LOGS_DIR}/mysql:/var/log
# - ${MYSQL_OVERRIDES}:/etc/mysql/mysql.conf.d
- ${MYSQL_OVERRIDES}:/etc/mysql/conf.d
- ${MYSQL_SCRIPTS}:/docker-entrypoint-initdb.d/
ports:
- 127.0.0.1:${MYSQL_PORT}:3306
networks:
- redcap_network
I think that's a valid point. If I recall I might have been making changes way back whenm but if you want to test and make a pull request, I'm happy to accept it.
Hi,
I've noticed that the docker-mysql folder is simply a Dockerfile which specifies a base image. This is exactly the same as specifying the image in the docker-compose.yml.
I'm just curious as to why you 'build' this dockerfile instead of just specifying the base image.
Thanks