(macOS/Docker) "Cannot bulk load. The file path does not exist or you don't have file access rights." I am running SQL Server from a Docker container on macOS. All queries except for the loading of the csv file is getting executed. The column names etc are correct. Any ideas?

error:


  Cannot bulk load. The file "/Users/me/snp500-company-by-sector.csv" does not exist or you don't have file access rights.


bulk insert CompanyBySector
from '/Users/me/snp500-company-by-sector.csv'
with
(   
    firstrow = 2,
    fieldterminator = ';',
    rowterminator = '\n',
    tablock
)
go
For anyone else who is new to running SQL Server in a macOS Docker container, you first need to find out your Docker container ID. The commands will be like this: 

List Docker info:

$ docker container ls
47940489ee07


Copy from the macOS directory to the Docker container directory:

$ docker cp /Users/Trump/snp500-companies.csv 47940489ee07:/snp500-company-by-sector.csv


https://docs.docker.com/docker-for-mac/