I was trying to study Docker, trying to build a docker environment using rails and checking the behavior, but I am having trouble because of an error.

Referenced articles

Error resolution

Starting docker_sample_db_1 ... error
ERROR: for docker_sample_db_1 Cannot start service db: Mounts denied: approving/Users/aaa/docker_sample/tmp/db: file does not exist
ERROR: for db Cannot start service db: Mounts denied: approving/Users/aaa/docker_sample/tmp/db: file does not exist
ERROR: Encountered errors while bringing up the project.
Corresponding source code

The source code is shown in the directory diagram.

├ mysql-confd
│ └default_authentication.yml
├ src
│ ├ Gemfile
│ └ Gemfile.lock
├ docker-compose.yml
└ Dockerfile
#frozen_string_literal: true
source "https://rubygems.org"
git_source (: github) {| repo_name | "https://github.com/#{repo_name}"}
#No description
# docker-compose.yml format version specification
version: '3'
services: services:
  # Rails container definition
    # Build image using Dockerfile
    build: ..
    #Default command when starting a container
    #Port number: 3000
    # IP address to bind:
    # Rails server responds when port 3000 arrives
    command: bundle exec rails s -p 3000 -b ''
    #Mount local src in container
    # Publish number 3000 outside the container
    #Public port number: Forwarding port number inside the container
    ports: ports:
      --3000: 3000
    #db container set to start first
    Set to debug using #pry
    tty: true
    stdin_open: true
  #MySQL container definition
    #Create container using mysql
    image: mysql: 5.7
      Set the default authentication format for # Mysql8.0 to mysql_native_password
      # Mount the locally held DB in the container
    # Define environment variables in the container
    environment: environment:
      # mysql root user password setting
      MYSQL_ROOT_PASSWORD: password
# Keep DB contents locally
#Dockerfile for Rails container
#Specify Ruby2.5.1 as the baseline of the image
FROM ruby: 2.6.5
#Install required packages for Rails
RUN apt-get update -qq&&apt-get install -y build-essential nodejs
#Create root directory
RUN mkdir/app
#Specify working directory
# Copy local Gemfile and Gemfile.lock
COPY src/Gemfile/app/Gemfile
COPY src/Gemfile.lock /app/Gemfile.lock
# Gem installation execution
RUN bundle install
#Copy local src
COPY src/app
What I tried (hypothesis I made)

This error says "db: file does not exist"
Oh, I guess it means that there is no file, but I wonder what kind of file I need to create. But I don't know where to look.

I was also doing something less productive by changing the mysql version of docker-compose.yml.

Other things I tried (from the edit request)
docker-compose down --rmi all --volumes --remove-orphans

With this, I deleted all the containers including image and tried again from the beginning.
The result didn't change ...

Supplementary information (FW/tool version, etc.)

ruby 2.6.5
docker 20.10.0
docker-compose 1.27.4