Mount config file to Docker and access it

I have a question on running my GO project inside a docker container.
My project has a config.yaml and some other files that should be accesable from outside of the container. Therefore I am planing to mount a folder to the volume /data. But how can I read form a file in the /data folder? My project is obviously not in that folder. Is there any best precise on what to do?

Here is my Dockerfile:

# syntax=docker/dockerfile:1
FROM golang:1.16-alpine3.14


COPY . .
RUN go mod download

RUN go build -o /gotify-matrix-bot-docker

VOLUME [ "/data" ]

CMD [ "/gotify-matrix-bot-docker" ]

My plan was to run the container docker run -it --rm -v data:/data gotify-matrix-bot. But now I can not access the files from within my GO script.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum