We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
When you create the container for the first time, it will create the required directory using this command from the run-always script.
mkdir -p /var/run/mysqld
But, if you do a docker-compose down and then issue a docker-compose up, this directory doesn't get created again and mysqld won't start.
As the run always has this line before shown below before the mkdir -p /var/run/mysqld
if [ -f /data/mysql.configured ]; then exit 0 fi
The issue is I map the data directory to the host and the mysql.configured is always true.
Please see the attached docker-compose.yml file.
version: '3.6' services: db: image: nimmis/alpine-mariadb volumes: - db_data_test:/data restart: always env_file: - .env environment: MARIADB_REMOTE_ROOT: 1 MARIADB_ROOT_PASSWORD: 1password1 MARIADB_DATABASE: mydatabase MARIADB_USER: myuser MARIADB_PASSWORD: 1myuserpassword ports: - "3306:3306"
networks: - frontend healthcheck: test: ["CMD-SHELL", 'mysqladmin ping'] interval: 10s timeout: 2s retries: 10
The text was updated successfully, but these errors were encountered:
I did the following
run the following command
docker volume create db_data_test to create the volume
docker volume create db_data_test
the used this modified version of your docker-compose.yml (removed som local defined option, BUT added the volume definition)
version: '3.6' volumes: db_data_test: services: db: image: nimmis/alpine-mariadb volumes: - db_data_test:/data restart: always environment: MARIADB_REMOTE_ROOT: 1 MARIADB_ROOT_PASSWORD: 1password1 MARIADB_DATABASE: mydatabase MARIADB_USER: myuser MARIADB_PASSWORD: 1myuserpassword ports: - "3306:3306"
docker-compose up and down works, with the data in the datavolume db_data_test
Sorry, something went wrong.
No branches or pull requests
Hi,
When you create the container for the first time, it will create the required directory using this command from the run-always script.
mkdir -p /var/run/mysqld
But, if you do a docker-compose down and then issue a docker-compose up, this directory doesn't get created again and mysqld won't start.
As the run always has this line before shown below before the mkdir -p /var/run/mysqld
if [ -f /data/mysql.configured ]; then
exit 0
fi
The issue is I map the data directory to the host and the mysql.configured is always true.
Please see the attached docker-compose.yml file.
version: '3.6'
services:
db:
image: nimmis/alpine-mariadb
volumes:
- db_data_test:/data
restart: always
env_file:
- .env
environment:
MARIADB_REMOTE_ROOT: 1
MARIADB_ROOT_PASSWORD: 1password1
MARIADB_DATABASE: mydatabase
MARIADB_USER: myuser
MARIADB_PASSWORD: 1myuserpassword
ports:
- "3306:3306"
The text was updated successfully, but these errors were encountered: