github-tijlxyz / khatru-pyramid

A nostr relay with a invite hierarchy
The Unlicense
22 stars 4 forks source link

Docker build failing #1

Closed hzrd149 closed 6 months ago

hzrd149 commented 9 months ago

Tried to build the docker image and it looks like go mod download failed :cry:

docker build .
[+] Building 3.3s (10/12)                                                                                                                                                                                                  docker:default
 => [internal] load .dockerignore                                                                                                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                                                                                      0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                 0.0s
 => => transferring dockerfile: 247B                                                                                                                                                                                                 0.0s
 => resolve image config for docker.io/docker/dockerfile:1                                                                                                                                                                           0.6s
 => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:ac85f380a63b13dfcefa89046420e1781752bab202122f8f50032edf31be0021                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/golang:1.21                                                                                                                                                                       0.4s
 => [1/6] FROM docker.io/library/golang:1.21@sha256:9baee0edab4139ae9b108fffabb8e2e98a67f0b259fd25283c2a084bd74fea0d                                                                                                                 0.0s
 => [internal] load build context                                                                                                                                                                                                    0.0s
 => => transferring context: 2.82kB                                                                                                                                                                                                  0.0s
 => CACHED [2/6] WORKDIR /app                                                                                                                                                                                                        0.0s
 => CACHED [3/6] COPY go.mod go.sum ./                                                                                                                                                                                               0.0s
 => ERROR [4/6] RUN go mod download                                                                                                                                                                                                  2.1s
------
 > [4/6] RUN go mod download:
2.091 go: github.com/fiatjaf/khatru@v0.1.0: reading github.com/fiatjaf/khatru/go.mod at revision v0.1.0: unknown revision v0.1.0
------
Dockerfile:8
--------------------
   6 |     
   7 |     COPY go.mod go.sum ./
   8 | >>> RUN go mod download
   9 |     
  10 |     COPY . .
--------------------
ERROR: failed to solve: process "/bin/sh -c go mod download" did not complete successfully: exit code: 1

I tried changing the version of github.com/fiatjaf/khatru from v0.1.0 to v0.0.14 but then the build command failed

fiatjaf commented 9 months ago

Sorry, I've been developing this locally and using it as my debugging tool for changes in khatru and eventstore, so the dependencies are in a messy state. I'll make a stable release hopefully very soon.

In the meantime if you really want to run this the easiest way is to use the replace directive to point to local versions of khatru and eventstore which should be pointing to master.

hzrd149 commented 9 months ago

Got it working by bumping the khatru version to master and the go-nostr version to v0.26.4 although Ill probably wait till there is a stable version before running this

github-tijlxyz commented 6 months ago

should all work now