Giter VIP home page Giter VIP logo

Comments (11)

nickjj avatar nickjj commented on May 25, 2024

Does bin/pip3-install exist in your cloned directory?

It exists in that spot in the repo: https://github.com/nickjj/docker-flask-example/blob/main/bin/pip3-install

Also did you change anything in the Dockerfile?

from docker-flask-example.

AndruMace avatar AndruMace commented on May 25, 2024

Wow thanks for responding so quickly!

pip3-install does exist in the correct location bin/pip3-install and no I've made no changes to the Dockerfile.

Edit: I'm on Windows 10 if that additional information helps.

from docker-flask-example.

nickjj avatar nickjj commented on May 25, 2024

Are you using WSL 2 or PowerShell?

from docker-flask-example.

AndruMace avatar AndruMace commented on May 25, 2024

I've tried it both with Powershell and Git-Bash (link below). I'm getting the same error in both.

https://git-scm.com/downloads

from docker-flask-example.

nickjj avatar nickjj commented on May 25, 2024

Would it be possible to try WSL / WSL 2?

from docker-flask-example.

AndruMace avatar AndruMace commented on May 25, 2024

Apologies for the delay, I had to get WSL2 set up on my machine and integrated with docker. Looks like WSL2 via Ubuntu 20.04 LTS did the trick! Strange that neither powershell nor gitbash (which has always served me well in the past) didn't work though. Any ideas how I could get it working with either of those?

from docker-flask-example.

nickjj avatar nickjj commented on May 25, 2024

Technically it should work with PowerShell. I'll look into it.

from docker-flask-example.

AndruMace avatar AndruMace commented on May 25, 2024

Thanks! Best of luck.

from docker-flask-example.

nickjj avatar nickjj commented on May 25, 2024

I was able to get it to build with PowerShell here without making any changes.

I did very similar steps as you. Instead of cloning it from github I copied the files from my WSL 2 instance to C:\Users\Nick\docker-flask-example then ran a docker-compose build which worked.

If I were to guess there's some permission issue with the shell scripts in the bin/ directory.

However when I ran it, it fails with permission errors due to Windows not knowing how to deal with Linux file permissions. My Dockerfile is configured to run as a non-root user, but Windows doesn't know how to match the user id / group id of a Linux machine to make the volumes work. This is a limitation of Docker and Windows unfortunately.

I would stick with WSL 2 if you can. It will be a lot faster in the end in terms of file performance if you keep the files inside of WSL 2's file system. Sorry for the bad news but there's no way to reasonably support PowerShell as far as I know. You're more than welcome to dive into the gory details on how Docker handles cross-OS file permissions, but that's a battle I don't want to fight. If you can get it working a PR would be much appreciated and I'd happily merge it in.

from docker-flask-example.

AndruMace avatar AndruMace commented on May 25, 2024

Gotcha, thanks for the information. I appreciate your time. I'll probably be sticking with WSL2 for the foreseeable future now that I have it installed, honestly I had been putting it off for far too long anyway haha. Have a nice day, thanks again.

from docker-flask-example.

nickjj avatar nickjj commented on May 25, 2024

No problem.

Here's a couple of blog posts / videos that may help with keeping your WSL 2 disk space in check btw. There's still some sharp edges around WSL 2 and how it frees up resources:

from docker-flask-example.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.