Skip to content

🐞 [Bug]: [Registrar] building image from dockerfile is not working #29

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

Open
hossnys opened this issue Jan 26, 2025 · 1 comment
Open
Assignees

Comments

@hossnys
Copy link

hossnys commented Jan 26, 2025

What happened?

  • when trying to install registrar by building image locally it didn't work
  • command used : docker build -t registrar:latest .

Relevant log output

root@registrar-dev4:~/tfgrid-sdk-go/node-registrar# docker build -t registrar:latest .
[+] Building 7.4s (11/14)                                                                                                                                                                    docker:default
 => [internal] load build definition from Dockerfile                                                                                                                                                   0.0s
 => => transferring dockerfile: 332B                                                                                                                                                                   0.0s
 => WARN: FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)                                                                                                                         0.0s
 => [internal] load metadata for docker.io/library/alpine:3.21                                                                                                                                         3.7s
 => [internal] load metadata for docker.io/library/golang:1.21-alpine                                                                                                                                  7.4s
 => [internal] load .dockerignore                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => CANCELED [builder 1/6] FROM docker.io/library/golang:1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94                                                           0.0s
 => => resolve docker.io/library/golang:1.21-alpine@sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94                                                                            0.0s
 => => sha256:2414035b086e3c42b99654c8b26e6f5b1b1598080d65fd03c7f499552ff4dc94 10.30kB / 10.30kB                                                                                                       0.0s
 => => sha256:8ee9b9e11ef79e314a7584040451a6df8e72a66712e741bf75951e05e587404e 1.92kB / 1.92kB                                                                                                         0.0s
 => => sha256:c2321c7cf7210be837249dba0f3699fad6ddbb5718e70344b28c0d58feff4c0b 2.10kB / 2.10kB                                                                                                         0.0s
 => CANCELED [stage-1 1/3] FROM docker.io/library/alpine:3.21@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099                                                                  0.0s
 => => resolve docker.io/library/alpine:3.21@sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099                                                                                   0.0s
 => => sha256:56fa17d2a7e7f168a043a2712e63aed1f8543aeafdcee47c58dcffe38ed51099 9.22kB / 9.22kB                                                                                                         0.0s
 => => sha256:483f502c0e6aff6d80a807f25d3f88afa40439c29fdd2d21a0912e0f42db842a 1.02kB / 1.02kB                                                                                                         0.0s
 => => sha256:b0c9d60fc5e3fa2319a86ccc1cdf34c94c7e69766e8cebfb4111f7e54f39e8ff 581B / 581B                                                                                                             0.0s
 => [internal] load build context                                                                                                                                                                      0.0s
 => => transferring context: 2B                                                                                                                                                                        0.0s
 => CACHED [builder 2/6] WORKDIR /app                                                                                                                                                                  0.0s
 => ERROR [builder 3/6] COPY /node-registrar/go.mod /node-registrar/go.sum .                                                                                                                           0.0s
 => CACHED [builder 4/6] RUN go mod download                                                                                                                                                           0.0s
 => ERROR [builder 5/6] COPY /node-registrar .                                                                                                                                                         0.0s
------
 > [builder 3/6] COPY /node-registrar/go.mod /node-registrar/go.sum .:
------
------
 > [builder 5/6] COPY /node-registrar .:
------

 1 warning found (use docker --debug to expand):
 - FromAsCasing: 'as' and 'FROM' keywords' casing do not match (line 1)
Dockerfile:9
--------------------
   7 |     RUN go mod download
   8 |     
   9 | >>> COPY /node-registrar .
  10 |     
  11 |     RUN go build -o server ./cmds/registrar.go
--------------------
ERROR: failed to solve: failed to compute cache key: failed to calculate checksum of ref a69d7fb9-0603-437a-8a58-72931621a248::2128ah49v9wu9rtoduf79makk: "/node-registrar": not found
@hossnys hossnys added the type_bug Something isn't working label Jan 26, 2025
@Eslam-Nawara
Copy link
Collaborator

you should run the server from the sdk root dir not from the node registrar, will updated it

@rawdaGastan rawdaGastan added node-registrar and removed type_bug Something isn't working labels Jan 26, 2025
@xmonader xmonader removed this from 3.16.x Feb 13, 2025
@rawdaGastan rawdaGastan transferred this issue from threefoldtech/tfgrid-sdk-go Mar 6, 2025
@Eslam-Nawara Eslam-Nawara self-assigned this May 14, 2025
@Eslam-Nawara Eslam-Nawara moved this to In Progress in 3.17 May 14, 2025
@Eslam-Nawara Eslam-Nawara removed this from 3.17 May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants