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

Docker build error: no such file or directory #49

Open
bartvdbraak opened this issue Dec 28, 2022 · 4 comments
Open

Docker build error: no such file or directory #49

bartvdbraak opened this issue Dec 28, 2022 · 4 comments

Comments

@bartvdbraak
Copy link

Steps to reproduce:

git clone [email protected]:prbinu/tls-scan.git
cd tls-scan
docker build -t tls-scan .

I received the following output:

[+] Building 47.7s (12/13)
 => [internal] load build definition from Dockerfile                         0.0s
 => => transferring dockerfile: 680B                                         0.0s
 => [internal] load .dockerignore                                            0.0s
 => => transferring context: 2B                                              0.0s
 => [internal] load metadata for docker.io/library/ubuntu:18.04              2.7s
 => https://curl.haxx.se/ca/cacert.pem                                       0.0s
 => [internal] load build context                                            2.0s
 => => transferring context: 870.76kB                                        1.7s
 => [builder 1/4] FROM docker.io/library/ubuntu:18.04@sha256:daf3e62183e8aa  3.3s
 => => resolve docker.io/library/ubuntu:18.04@sha256:daf3e62183e8aa9a56878a  0.0s
 => => sha256:daf3e62183e8aa9a56878a685ed26f3af3dd8c08c8fd1 1.41kB / 1.41kB  0.0s
 => => sha256:9ad19d39c58f78bb262e777201ff498b2be5b1f020ac36972 529B / 529B  0.0s
 => => sha256:251b86c83674d45abbf5736ae35654fca6145e9aaaf14 1.46kB / 1.46kB  0.0s
 => => sha256:fb668870d8a72b5d72a3b6d98ee626e00f9f7c29c6f 26.71MB / 26.71MB  2.5s
 => => extracting sha256:fb668870d8a72b5d72a3b6d98ee626e00f9f7c29c6f4f7d3a6  0.7s
 => [stage-1 2/5] RUN useradd -rU tls-scan                                   0.4s
 => [builder 2/4] RUN set -xeu;     apt-get update;     apt-get install -y  28.0s
 => [stage-1 3/5] WORKDIR /usr/local/share/tls-scan/                         0.0s
 => [builder 3/4] COPY . /usr/local/src/tls-scan                             0.0s
 => [builder 4/4] RUN set -xeu;     cd /usr/local/src/tls-scan;     ./buil  13.5s
 => ERROR [stage-1 4/5] COPY --from=builder /usr/local/src/tls-scan/build-r  0.0s
------
 > [stage-1 4/5] COPY --from=builder /usr/local/src/tls-scan/build-root/bin/tls-scan /usr/local/bin/tls-scan:
------
failed to compute cache key: failed to walk /var/lib/docker/tmp/buildkit-mount3498967087/usr/local/src/tls-scan/build-root/bin: lstat /var/lib/docker/tmp/buildkit-mount3498967087/usr/local/src/tls-scan/build-root/bin: no such file or directory

Any idea what is happening here?

I am running on OSX, here is some information about my system:

System

$ neofetch
                    'c.          
                 ,xNMM.          --------------------------------------
               .OMMMMo           OS: macOS 12.6.1 21G217 x86_64
               OMMM0,            Host: MacBookPro16,1
     .;loddo:' loolloddol;.      Kernel: 21.6.0
   cKMMMMMMMMMMNWMMMMMMMMMM0:    Uptime: 8 days, 31 mins
 .KMMMMMMMMMMMMMMMMMMMMMMMWd.    Packages: 274 (brew)
 XMMMMMMMMMMMMMMMMMMMMMMMX.      Shell: zsh 5.8.1
;MMMMMMMMMMMMMMMMMMMMMMMM:       Resolution: 2560x1440, 1792x1120, 2560x1440
:MMMMMMMMMMMMMMMMMMMMMMMM:       DE: Aqua
.MMMMMMMMMMMMMMMMMMMMMMMMX.      WM: Spectacle
 kMMMMMMMMMMMMMMMMMMMMMMMMWd.    Terminal: WarpTerminal
 .XMMMMMMMMMMMMMMMMMMMMMMMMMMk   CPU: Intel i9-9880H (16) @ 2.30GHz
  .XMMMMMMMMMMMMMMMMMMMMMMMMK.   GPU: Intel UHD Graphics 630, AMD Radeon Pro 5500
    kMMMMMMMMMMMMMMMMMMMMMMd     Memory: 19305MiB / 32768MiB
     ;KMMMMMMMWXXWMMMMMMMk.
       .cooc,.    .,coo:.

Docker

$ docker --version
Docker version 20.10.21, build baeda1f
@prbinu
Copy link
Owner

prbinu commented Jan 4, 2023

Not sure what the issue is. It is working for me on MacOS. Pasting the log if that helps:

$ git clone https://github.com/prbinu/tls-scan.git
Cloning into 'tls-scan'...
remote: Enumerating objects: 613, done.
remote: Counting objects: 100% (192/192), done.
remote: Compressing objects: 100% (88/88), done.
remote: Total 613 (delta 80), reused 154 (delta 68), pack-reused 421
Receiving objects: 100% (613/613), 351.35 KiB | 2.47 MiB/s, done.
Resolving deltas: 100% (329/329), done.

$ cd tls-scan/
$ ls
CHANGELOG		INSTALL			Makefile.am		_config.yml		build-x86-64.sh		cert-parser.c		configure.ac		include			man			tests
Dockerfile		LICENSE.txt		README.md		bootstrap.sh		ca-bundle.crt		common.c		gnutls13.c		main.c			proto-adapters.c

$ docker build -t tls-scan .
[+] Building 609.5s (14/14) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                       0.1s
 => => transferring dockerfile: 735B                                                                                                                                                                                                                       0.1s
 => [internal] load .dockerignore                                                                                                                                                                                                                          0.1s
 => => transferring context: 2B                                                                                                                                                                                                                            0.0s
 => [internal] load metadata for docker.io/library/ubuntu:20.04                                                                                                                                                                                            2.5s
 => https://curl.haxx.se/ca/cacert.pem                                                                                                                                                                                                                     0.0s
 => [internal] load build context                                                                                                                                                                                                                          0.2s
 => => transferring context: 875.07kB                                                                                                                                                                                                                      0.1s
 => [builder 1/4] FROM docker.io/library/ubuntu:20.04@sha256:0e0402cd13f68137edb0266e1d2c682f217814420f2d43d300ed8f65479b14fb                                                                                                                             15.0s
 => => resolve docker.io/library/ubuntu:20.04@sha256:0e0402cd13f68137edb0266e1d2c682f217814420f2d43d300ed8f65479b14fb                                                                                                                                      0.0s
 => => sha256:846c0b181fff0c667d9444f8378e8fcfa13116da8d308bf21673f7e4bea8d580 28.58MB / 28.58MB                                                                                                                                                           5.0s
 => => sha256:0e0402cd13f68137edb0266e1d2c682f217814420f2d43d300ed8f65479b14fb 1.42kB / 1.42kB                                                                                                                                                             0.0s
 => => sha256:8eb87f3d6c9f2feee114ff0eff93ea9dfd20b294df0a0353bd6a4abf403336fe 529B / 529B                                                                                                                                                                 0.0s
 => => sha256:d5447fc01ae62c20beffbfa50bc51b2797f9d7ebae031b8c2245b5be8ff1c75b 1.46kB / 1.46kB                                                                                                                                                             0.0s
 => => extracting sha256:846c0b181fff0c667d9444f8378e8fcfa13116da8d308bf21673f7e4bea8d580                                                                                                                                                                  6.7s
 => [stage-1 2/5] RUN useradd -rU tls-scan                                                                                                                                                                                                                 4.4s
 => [builder 2/4] RUN set -xeu;     apt-get update;     apt-get install -y         build-essential         autoconf         automake         pkg-config         curl         zip         libtool                                                          61.5s
 => [stage-1 3/5] WORKDIR /usr/local/share/tls-scan/                                                                                                                                                                                                       2.7s
 => [builder 3/4] COPY . /usr/local/src/tls-scan                                                                                                                                                                                                           0.1s
 => [builder 4/4] RUN set -xeu;     cd /usr/local/src/tls-scan;     ./build-x86-64.sh                                                                                                                                                                    529.5s
 => [stage-1 4/5] COPY --from=builder /usr/local/src/tls-scan/build-root/bin/tls-scan /usr/local/bin/tls-scan                                                                                                                                              0.1s
 => [stage-1 5/5] ADD --chown=tls-scan:tls-scan https://curl.haxx.se/ca/cacert.pem ./ca-bundle.crt                                                                                                                                                         0.0s
 => exporting to image                                                                                                                                                                                                                                     0.2s
 => => exporting layers                                                                                                                                                                                                                                    0.1s
 => => writing image sha256:d76760df51722e90cb2e7402fedeac64e1bfa39a7d27cd147b79b552d1eaf07e                                                                                                                                                               0.0s
 => => naming to docker.io/library/tls-scan                                                                                                                                                                                                                0.0s


$ docker run --rm tls-scan --version
tls-scan 1.5.0 Linux 2023-01-04
Built with OpenSSL-100020b0 GnuTLS-3060a

@bartvdbraak
Copy link
Author

I will re-install docker and retry.

@ajb
Copy link

ajb commented Mar 8, 2023

same issue. maybe an issue with m1 macs?

@prbinu
Copy link
Owner

prbinu commented Mar 9, 2023

@ajb
The original reporter's Mac appears to be x86.

BTW, we do not support Mac arm yet. I've recently created a branch for Linux arm (https://github.com/prbinu/tls-scan/tree/arm), but not merged yet. Unfortunately, Github Actions doesn't natively support arm builds.

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

3 participants