Giter VIP home page Giter VIP logo

Comments (2)

metafates avatar metafates commented on May 10, 2024 1

Hi!

Sure, I can make instruction more clear.

If you run make It will show available options.

  • To build: make build
  • To install (build and add to path): make install

It will automatically build binary for your arch. You if want cross compilation you'll have to set env variables to specify what os and arch you'd like to build for

GOOS=darwin GOARCH=386 make build

Available GOOS and GOARCH

Hope it helps!

from mangal.

schklom avatar schklom commented on May 10, 2024 1

@metafates Thanks for making clear instructions!
I am not sure how one would run the binary from a Docker image because it seems to require manual configuration.
Here is a working Dockerfile that builds the binary from source and creates a small image, if it helps :)

FROM golang:latest AS builder

ENV MANGAL_DOWNLOADER_PATH=/downloads
ENV MANGAL_UID=1000
ENV MANGAL_GID=1000

COPY . /mangal-build
WORKDIR /mangal-build
RUN GOOS=linux GOARCH=arm64 make build

FROM alpine:latest

COPY --from=builder --chown=${MANGAL_UID}:${MANGAL_GID} /mangal-build/mangal /mangal
COPY --from=builder --chown=${MANGAL_UID}:${MANGAL_GID} /mangal-build/config /config
COPY --from=builder --chown=${MANGAL_UID}:${MANGAL_GID} /mangal-build/downloads ${MANGAL_DOWNLOADER_PATH}

USER ${MANGAL_UID}:${MANGAL_GID}

WORKDIR /

ENTRYPOINT ["/mangal"]

from mangal.

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.