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

Error while compiling #144

Open
divyam234 opened this issue Jan 20, 2024 · 1 comment
Open

Error while compiling #144

divyam234 opened this issue Jan 20, 2024 · 1 comment

Comments

@divyam234
Copy link

divyam234 commented Jan 20, 2024

ERROR: failed to solve: process "/bin/sh -c xx-apk add --no-cache gcc musl-dev vips-dev" did not complete successfully: exit code: 4
Error: buildx failed with: ERROR: failed to solve: process "/bin/sh -c xx-apk add --no-cache gcc musl-dev vips-dev" did not complete successfully: exit code: 4
FROM --platform=${BUILDPLATFORM} tonistiigi/xx AS cc-helpers
FROM --platform=${BUILDPLATFORM} golang:alpine as builder

ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG TARGETOS
ARG TARGETARCH

RUN apk add clang lld libcap-utils

COPY --from=cc-helpers / /

RUN xx-apk add --no-cache gcc musl-dev vips-dev

ENV CGO_ENABLED=1

COPY go.mod go.sum ./

RUN go mod download

COPY main.go ./

RUN xx-go build -o main &&  xx-verify main

FROM --platform=${TARGETPLATFORM:-linux/amd64} alpine

RUN apk add --no-cache vips-dev

WORKDIR /app

RUN adduser -D -u 1000 user

COPY --chown=user:user --from=builder /main /app/main

USER user

ENV MALLOC_ARENA_MAX 2

ENTRYPOINT ["/app/main" ]

Not able to compile go app

@tonistiigi
Copy link
Owner

What are the logs and command you are running. Probably #36

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

2 participants