As mentioned above the database is being initialized on every nerdctl compose down; nerdctl compose up
? We are trying to spin a test database with some seed data for local testing.
The following is the Dockerfile
definition
FROM mysql:5.6
ENV MYSQL_DATABASE some_name
ENV MYSQL_ALLOW_EMPTY_PASSWORD 1
COPY mysql-bootstrap/*.sql* /docker-entrypoint-initdb.d/
EXPOSE 3306
The following is the docker-compose.yml
file definition.
version: "3.9"
services:
database:
platform: linux/x86_64
build: database
ports:
- "3306:3306"
I've not mounted any volume as I wanted to use docker's internal volume management as mentioned in Where to Store Data
section of https://hub.docker.com/_/mysql
I'm using nerdctl
provided by rancherdesktop
on macos