-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Possible memory leak on macOS running in Docker #5030
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
Comments
Hey, thank you for opening your first Issue ! 🙂 If you would like to contribute we have a guide for contributors. |
This comment was marked as off-topic.
This comment was marked as off-topic.
If you are facing the same problem, the best way to contribute is to provide the following information: A code example or link to a public repository.
You can also read the following issues: #5012, #4989, #4933, #4909, #4908, #4932 |
@ldez Unfortunately I can't post a code sample because I cannot pinpoint exactly where the problem is happening in my code base. The rest of the requirements for opening the issue is all there. |
@feketegy my message was mainly for @benoitgravitee. Can you provide the information about the image you are using? |
Sure, it's the basic I hope this helps. FROM arm64v8/golang:1.23.1-alpine3.20 AS base
RUN apk update \
&& apk add make \
&& apk add git \
&& apk add mercurial \
&& apk add bash \
&& apk add curl \
&& apk add musl-dev \
&& apk add vips-dev \
&& apk add gcc
FROM base AS api
ENV GOPATH /go
ENV GOBIN /go/bin
ENV PATH "$PATH:$GOPATH/bin"
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 \
&& go install github.com/matryer/moq@latest \
&& go install github.com/cespare/reflex@latest |
This comment was marked as off-topic.
This comment was marked as off-topic.
@Mexx77 If you are facing the same problem, the best way to contribute is to provide the following information: A code example or link to a public repository.
You can read the following documentation: https://golangci-lint.run/welcome/faq/#which-go-versions-are-supported |
I don't have a mac or arm64 computer, so I adapted the Dockerfile for Linux/amd64 and run it on golangci-lint code. I see no unexpected memory usage. I think to different context that could lead to extra memory consumption:
FROM golang:1.23.1-alpine3.20 AS base
RUN apk update \
&& apk add make \
&& apk add git \
&& apk add mercurial \
&& apk add bash \
&& apk add curl \
&& apk add musl-dev \
&& apk add vips-dev \
&& apk add gcc
FROM base AS api
ENV GOPATH=/go
ENV GOBIN=/go/bin
ENV PATH="$PATH:$GOPATH/bin"
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0
# Set all directories as safe
RUN git config --global --add safe.directory '*'
docker build -t sandbox:temp . $ docker run --rm -v $(pwd):/app -w /app -it sandbox:temp sh
/app # go mod tidy
go: downloading github.com/spf13/pflag v1.0.5
...
go: downloading github.com/go-task/slim-sprig/v3 v3.0.0
/app # golangci-lint version
golangci-lint has version 1.61.0 built with go1.23.1 from a1d6c560 on 2024-09-09T17:44:42Z
/app # golangci-lint run
/app # |
Welcome
typecheck
section of the FAQ.Description of the problem
I can't pinpoint the exact code block that produces 23GB memory usage on macOS running the linter inside Docker in an Alpine Linux 3.20 container, but I don't think this is normal.
Version of golangci-lint
Configuration
Go environment
Verbose output of running
A minimal reproducible example or link to a public repository
// add your code here
Validation
Supporter
The text was updated successfully, but these errors were encountered: