Giter VIP home page Giter VIP logo

Comments (3)

maebeam avatar maebeam commented on August 27, 2024

Sorry, we don't plan to make this a config value. You're welcome to run a custom fork if you want to fetch more profiles.

from run.

lobovkin avatar lobovkin commented on August 27, 2024

I can't just run a custom fork build from bitclout/backend, it shows after replacing /bitclout/bin/backend:
"standard_init_linux.go:228: exec user process caused: no such file or directory"
Can you post instructions on how you make a binary for bitclout/run docker?

from run.

tijno avatar tijno commented on August 27, 2024

@lobovkin this is what I use the build backend from source. It may help. I

Note that ive not tried this with the new DeSo repos. ll run it later today to make sure it functions as expected.

Assuming working folder /tmp

  1. clone core
  2. clone backend
  3. create dist folder
  4. create Dockerfile as per below
  5. run docker build -t bin --platform linux/amd64 --output dist/ .
  6. linux compatible backend now in /tmp/dist/backend

Dockerfile to build binary

FROM --platform=${BUILDPLATFORM} golang:1.16.5 AS build
WORKDIR /src
#ENV CGO_ENABLED=1

RUN apt update && apt install -y libvips-dev

COPY backend/go.mod backend/
COPY backend/go.sum backend/
COPY core/go.mod core/
COPY core/go.sum core/
COPY core/third_party/ core/third_party/

WORKDIR /src/backend

RUN go mod download

# include backend src
COPY backend/config  config
COPY backend/cmd     cmd
COPY backend/miner   miner
COPY backend/routes  routes
COPY backend/main.go .

# include core src
COPY core/clouthash ../core/clouthash
COPY core/cmd       ../core/cmd
COPY core/lib       ../core/lib
COPY core/migrate   ../core/migrate

# build backend
#RUN GOOS=linux go build -mod=mod -a -installsuffix cgo -o bin/backend main.go
ARG TARGETOS
ARG TARGETARCH
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -mod=mod -a -installsuffix cgo -o /out/backend main.go

FROM scratch AS bin-unix
COPY --from=build /out/backend /

FROM bin-unix AS bin-linux
FROM bin-unix AS bin-darwin

FROM scratch AS bin-windows
COPY --from=build /out/backend /backend.exe

FROM bin-${TARGETOS} AS bin

from run.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.