jgomezdans / geog_docker

Docker image for Geospatial Python teaching
GNU General Public License v3.0
4 stars 1 forks source link

Docker cache not cacheing #6

Closed jgomezdans closed 4 years ago

jgomezdans commented 4 years ago

I spend good money on this cache thing but it seems it's not working... When (and if) it works, it should be used to push the image on release.

jgomezdans commented 4 years ago

This is mostly working now, so closing issue.

profLewis commented 4 years ago

Hi - I’m sure im just being stupid, but when I run the docker in Windows (at least) files created are not persistent.

It’s not a permissions thing as I can write.

Eg

docker run jgomezdans/geog bash -c “echo hello > hello.dat; cat hello.dat”

-> hello

docker run jgomezdans/geog bash -c “cat hello.dat”

-> no such file or directory

Is that the same on Linux? Must be a settings thing.

Lewis

Professor Philip Lewis, UCL

On 17 Jul 2020, at 16:32, José Gómez-Dans notifications@github.com wrote:

 This is mostly working now, so closing issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

profLewis commented 4 years ago

OK … so its not so hard .. use symbolic links everywhere. Heres my solution.

  1. I think you mentioned one drive before & maybe we should indeed recommend that as the link. Ive assumed below. But its done by sym link again (!) so they could always change it...

  2. Do we put that in the core Dockerfile?? If we leave the my_work, it is generic

  3. They only need do the cmd.sh stuff once. Then

docker run -v local:/volume -it -v "/Users/plewis/OneDrive - University College London":/local geog

Which is getting a bit long … but that’s the fault of the dir name. Lewis

On 18 Jul 2020, at 16:13, Lewis dr.p.e.lewis@gmail.com wrote:

Maybe I just hadn’t noticed it beforez or thought about it. I’ve just been setting up dockers, not using them ... And I was wondering how we get people to save stuff that’s readable outside of the docker.

Maybe we just have to set that up, and tell them to save there.

Lewis

Professor Philip Lewis, UCL

On 18 Jul 2020, at 15:54, Lewis dr.p.e.lewis@gmail.com wrote:

Hi - I’m sure im just being stupid, but when I run the docker in Windows (at least) files created are not persistent.

It’s not a permissions thing as I can write.

Eg

docker run jgomezdans/geog bash -c “echo hello > hello.dat; cat hello.dat”

-> hello

docker run jgomezdans/geog bash -c “cat hello.dat”

-> no such file or directory

Is that the same on Linux? Must be a settings thing.

Lewis

Professor Philip Lewis, UCL

On 17 Jul 2020, at 16:32, José Gómez-Dans notifications@github.com wrote:



This is mostly working now, so closing issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jgomezdans/geog_docker/issues/6#issuecomment-660172676, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOC3GSMZ6JBUKRG24RC7L3R4BVJJANCNFSM4O5B6D7Q.

profLewis commented 4 years ago

Or rather

docker run -p 8888:8888 -v local:/volume -it -v "/Users/plewis/OneDrive - University College London":/local geog

On 19 Jul 2020, at 00:57, Philip Lewis dr.p.e.lewis@gmail.com wrote:

OK … so its not so hard .. use symbolic links everywhere. Heres my solution.

  1. I think you mentioned one drive before & maybe we should indeed recommend that as the link. Ive assumed below. But its done by sym link again (!) so they could always change it...

  2. Do we put that in the core Dockerfile?? If we leave the my_work, it is generic

3. They only need do the cmd.sh stuff once. Then docker run -v local:/volume -it -v "/Users/plewis/OneDrive - University College London":/local geog Which is getting a bit long … but that’s the fault of the dir name. Lewis > On 18 Jul 2020, at 16:13, Lewis > wrote: > > Maybe I just hadn’t noticed it beforez or thought about it. I’ve just been setting up dockers, not using them ... And I was wondering how we get people to save stuff that’s readable outside of the docker. > > Maybe we just have to set that up, and tell them to save there. > > Lewis > > Professor Philip Lewis, UCL > >> On 18 Jul 2020, at 15:54, Lewis > wrote: >> >> Hi - I’m sure im just being stupid, but when I run the docker in Windows (at least) files created are not persistent. >> >> It’s not a permissions thing as I can write. >> >> Eg >> >> docker run jgomezdans/geog bash -c “echo hello > hello.dat; cat hello.dat” >> >> -> hello >> >> docker run jgomezdans/geog bash -c “cat hello.dat” >> >> -> no such file or directory >> >> Is that the same on Linux? Must be a settings thing. >> >> Lewis >> >> Professor Philip Lewis, UCL >> >>> On 17 Jul 2020, at 16:32, José Gómez-Dans > wrote: >>> >>>  >>> >>> This is mostly working now, so closing issue. >>> >>> — >>> You are receiving this because you are subscribed to this thread. >>> Reply to this email directly, view it on GitHub , or unsubscribe . >>>
profLewis commented 4 years ago

Or maybe all of that symbolic link stuff is a red herring And all you need do is: https://phoenixnap.com/kb/docker-run-command-with-examples

For mounting volumes use the -vattribute with the specified location of the directory where you want to save the data, followed by where that data will be located inside the container. -v [/host/volume/location]:[/container/storage]

Professor Philip Lewis, UCL

On 19 Jul 2020, at 00:58, Philip Lewis dr.p.e.lewis@gmail.com wrote:

Or rather

docker run -p 8888:8888 -v local:/volume -it -v "/Users/plewis/OneDrive - University College London":/local geog

On 19 Jul 2020, at 00:57, Philip Lewis dr.p.e.lewis@gmail.com wrote:

OK … so its not so hard .. use symbolic links everywhere. Heres my solution.

  1. I think you mentioned one drive before & maybe we should indeed recommend that as the link. Ive assumed below. But its done by sym link again (!) so they could always change it...

  2. Do we put that in the core Dockerfile?? If we leave the my_work, it is generic

3. They only need do the cmd.sh stuff once. Then docker run -v local:/volume -it -v "/Users/plewis/OneDrive - University College London":/local geog Which is getting a bit long … but that’s the fault of the dir name. Lewis > On 18 Jul 2020, at 16:13, Lewis wrote: > > Maybe I just hadn’t noticed it beforez or thought about it. I’ve just been setting up dockers, not using them ... And I was wondering how we get people to save stuff that’s readable outside of the docker. > > Maybe we just have to set that up, and tell them to save there. > > Lewis > > Professor Philip Lewis, UCL > >> On 18 Jul 2020, at 15:54, Lewis wrote: >> >> Hi - I’m sure im just being stupid, but when I run the docker in Windows (at least) files created are not persistent. >> >> It’s not a permissions thing as I can write. >> >> Eg >> >> docker run jgomezdans/geog bash -c “echo hello > hello.dat; cat hello.dat” >> >> -> hello >> >> docker run jgomezdans/geog bash -c “cat hello.dat” >> >> -> no such file or directory >> >> Is that the same on Linux? Must be a settings thing. >> >> Lewis >> >> Professor Philip Lewis, UCL >> >>> On 17 Jul 2020, at 16:32, José Gómez-Dans wrote: >>> >>>  >>> >>> This is mostly working now, so closing issue. >>> >>> — >>> You are receiving this because you are subscribed to this thread. >>> Reply to this email directly, view it on GitHub, or unsubscribe. >>>