Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows 10, unable to prepare context: path "/path_to_cloned_repository/proxy/" not found #74

Open
Ebad2001 opened this issue Jan 8, 2023 · 7 comments

Comments

@Ebad2001
Copy link

Ebad2001 commented Jan 8, 2023

i tried this in PowerShell

PS C:\Users\hp> docker build /path_to_cloned_repository/proxy/ -t whatsapp_proxy:1.0
[+] Building 0.1s (2/2) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.2s
 => => transferring dockerfile: 2B                                                                                 0.1s
 => [internal] load .dockerignore                                                                                  0.1s
 => => transferring context: 2B                                                                                    0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount3731472316/Dockerfile: no such file or directory

Am i even supposed to run this in PowerShell or is there some other shell in docker desktop?
i didn't download the compose because i heard it comes already with docker windows installation.

@kartikwatwani
Copy link

path_to_cloned_repository is just dummy path. You need to use the path where the cloned repository is actually saved in your PC.

@Ebad2001
Copy link
Author

Ebad2001 commented Jan 8, 2023

path_to_cloned_repository is just dummy path. You need to use the path where the cloned repository is actually saved in your PC.

where do i find that?

@kartikwatwani
Copy link

kartikwatwani commented Jan 8, 2023

For eg. If you open PowerShell and you are at C:\Users\hp and you run git clone https://github.com/WhatsApp/proxy.git whatsapp-proxy-repo. You will have to execute docker build C:\Users\hp\whatsapp-proxy-repo\proxy -t whatsapp_proxy:1.0

@Ebad2001
Copy link
Author

Ebad2001 commented Jan 8, 2023

docker build C:\Users\hp\whatsapp-proxy-repo\proxy -t whatsapp_proxy:1.0

ok then i got this

PS C:\Users\hp> git clone https://github.com/WhatsApp/proxy.git whatsapp-proxy-repo
Cloning into 'whatsapp-proxy-repo'...
remote: Enumerating objects: 56, done.
remote: Counting objects: 100% (15/15), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 56 (delta 8), reused 5 (delta 5), pack-reused 41Receiving objects:  71% (40/56)
Receiving objects: 100% (56/56), 29.30 KiB | 1.83 MiB/s, done.
Resolving deltas: 100% (16/16), done.
PS C:\Users\hp> docker build C:\Users\hp\whatsapp-proxy-repo\proxy -t whatsapp_proxy:1.0
[+] Building 11.0s (10/18)
 => [internal] load build definition from Dockerfile                                                                                                     0.2s
 => => transferring dockerfile: 1.99kB                                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                                        0.2s
 => => transferring context: 190B                                                                                                                        0.0s
 => [internal] load metadata for docker.io/library/haproxy:lts-alpine                                                                                    3.4s
 => [auth] library/haproxy:pull token for registry-1.docker.io                                                                                           0.0s
 => [ 1/14] FROM docker.io/library/haproxy:lts-alpine@sha256:0c2a8eed910f0b45946a9ec240b572ee07363008e6634bdf442e165c5bae1b2a                            2.4s
 => => resolve docker.io/library/haproxy:lts-alpine@sha256:0c2a8eed910f0b45946a9ec240b572ee07363008e6634bdf442e165c5bae1b2a                              0.0s
 => => sha256:0c2a8eed910f0b45946a9ec240b572ee07363008e6634bdf442e165c5bae1b2a 1.65kB / 1.65kB                                                           0.0s
 => => sha256:147cf081fbfa0e063a615ccaab240df9cdff5c8bafe90b399d3c5dd9fc1b7762 1.15kB / 1.15kB                                                           0.0s
 => => sha256:278bf9b5aa98291d18fb510e82d1bf05b23ae8f5d829eae252ee1330ecfce213 5.11kB / 5.11kB                                                           0.0s
 => => sha256:c158987b05517b6f2c5913f3acef1f2182a32345a304fe357e3ace5fadcad715 3.37MB / 3.37MB                                                           1.0s
 => => sha256:66720c2ceff18a891e424e16fe02b075f45dc7c7ab155e5a3585adecd498a237 1.28kB / 1.28kB                                                           0.8s
 => => sha256:7147cd9613d200bdbf8c38549915949a8dac3c19bbb3b8ae9dc4ab799c13b2d5 7.48MB / 7.48MB                                                           1.5s
 => => sha256:1d7952b45b3ca1bc37102a5bba8ccdd4b53345c9c45f9ce90486dfc46a2d439c 450B / 450B                                                               1.2s
 => => extracting sha256:c158987b05517b6f2c5913f3acef1f2182a32345a304fe357e3ace5fadcad715                                                                0.4s
 => => extracting sha256:66720c2ceff18a891e424e16fe02b075f45dc7c7ab155e5a3585adecd498a237                                                                0.0s
 => => extracting sha256:7147cd9613d200bdbf8c38549915949a8dac3c19bbb3b8ae9dc4ab799c13b2d5                                                                0.3s
 => => extracting sha256:1d7952b45b3ca1bc37102a5bba8ccdd4b53345c9c45f9ce90486dfc46a2d439c                                                                0.0s
 => [internal] load build context                                                                                                                        0.1s
 => => transferring context: 10.48kB                                                                                                                     0.0s
 => [ 2/14] RUN apk --update --no-cache add curl openssl jq bash                                                                                         3.3s
 => [ 3/14] WORKDIR /certs                                                                                                                               0.5s
 => [ 4/14] COPY src/generate-certs.sh /usr/local/bin/generate-certs.sh                                                                                  0.3s
 => ERROR [ 5/14] RUN chmod +x /usr/local/bin/generate-certs.sh &&     /usr/local/bin/generate-certs.sh &&     mkdir --parents /etc/haproxy/ssl/ &&      0.7s
------
 > [ 5/14] RUN chmod +x /usr/local/bin/generate-certs.sh &&     /usr/local/bin/generate-certs.sh &&     mkdir --parents /etc/haproxy/ssl/ &&     mv /certs/proxy.whatsapp.net.pem /etc/haproxy/ssl/proxy.whatsapp.net.pem &&     chown -R haproxy:haproxy /etc/haproxy/:
#10 0.647 /bin/sh: /usr/local/bin/generate-certs.sh: not found
------
executor failed running [/bin/sh -c chmod +x /usr/local/bin/generate-certs.sh &&     /usr/local/bin/generate-certs.sh &&     mkdir --parents /etc/haproxy/ssl/ &&     mv /certs/proxy.whatsapp.net.pem /etc/haproxy/ssl/proxy.whatsapp.net.pem &&     chown -R haproxy:haproxy /etc/haproxy/]: exit code: 127

@slawlor
Copy link
Contributor

slawlor commented Jan 9, 2023

Might be related to #72 which just merged. Try git pull and running again

@Ebad2001
Copy link
Author

Might be related to #72 which just merged. Try git pull and running again

i am sorry i am new to GitHub i don't understand
can you give the full steps here?

@eozturk1
Copy link
Contributor

eozturk1 commented Jan 11, 2023

I think the issue is related to the current directory.

From PS C:\Users\hp>, try running

cd whatsapp-proxy-repo
git pull
docker build proxy/ -t whatsapp_proxy:1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants