https://rancher.com/ logo
#rancher-desktop
Title
# rancher-desktop
a

adamant-kite-43734

10/04/2022, 9:38 PM
This message was deleted.
a

able-midnight-97613

10/04/2022, 9:39 PM
rancher desktop on macos catalina
f

flaky-dusk-65029

10/05/2022, 8:54 PM
hm, my understanding is that when you mount a volume with that
-v
flag, it mounts directories, not individual files. so that flag mounted that file
/tmp/local-gbs-user/init.sql
to a dir called
/sql/init.sql
you should probably be doing
-v /tmp/local-gbs-user:/sql
a

able-midnight-97613

10/07/2022, 12:20 AM
forgot to mention that mounted the file as a directory too which felt very weird
Copy code
$ cat /tmp/local-gbs-user/init.sql 
IF DB_ID('backend_sim') IS NULL
CREATE DATABASE backend_sim;
GO
$ docker run --rm -ti --name sqlinit -v /tmp/local-gbs-user:/sql --entrypoint bash australia-southeast1-docker.pkg.dev/gb-plat-dev-gar-v1/apps-docker-repo/mcr.microsoft.com/mssql-tools:latest-1205
bob@c07e5a242ee1:/$ cat /sql/init.sql
cat: /sql/init.sql: Is a directory
also i did look at the docs and that seemed to suggest you could do files
f

flaky-dusk-65029

10/07/2022, 8:58 PM
..then in that case , what you're doing seems fine. That said, i've only ever mounted directories:directories, never files:files . sorry!
a

able-midnight-97613

10/10/2022, 3:07 AM
what next? should i deal with this via github issues?
4 Views