I have the following line in my Dockerfile:
RUN git clone https://github.com/assafg/youtube-remote.git ./youtube-remote
When executing sudo docker build -t 'yremote' . I get the following error:
Cloning into './youtube-remote'... fatal: unable to access 'https://github.com/assafg/youtube-remote.git/': Could not resolve host: github.com The command '/bin/sh -c git clone https://github.com/assafg/youtube-remote.git ./youtube-remote' returned a non-zero code: 128
Running clone command from command line works fine.
You can create a complete local copy of a Git repository from a public project by cloning it. Cloning a repo downloads all commits and branches in the repo and sets up a named relationship with the existing repo you cloned.
Yes! We can do that following these steps: Create a new Blank Project instead of Clone. Click the 'Configure Git' button and use the existing private repo for the git remote.
This can happen if your container can't connect to the internet. Possibly because it was started with a weird networking option? Run this command to check default internet connectivity:
docker run ubuntu apt install -y git && \
git clone https://github.com/assafg/youtube-remote.git ./youtube-remote
If that container successfully pulls down the repo, it probably means the first container has a networking problem. Try to restart, or change networking settings.
Docker Network just became a first class citizen in the Docker ecosystem. It's a really fast-moving project. This advice applies to v1.8
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With