blob: 5a7f79355070258308e054f02d533f4b402c029c [file] [log] [blame]
FROM golang:1.24.2-alpine3.21
RUN apk add bash git make jq sqlite gcc musl-dev linux-headers npm nodejs go github-cli ripgrep fzf
ENV GOTOOLCHAIN=auto
ENV GOPATH=/go
ENV PATH="$GOPATH/bin:$PATH"
RUN go install golang.org/x/tools/cmd/goimports@latest
RUN go install golang.org/x/tools/gopls@latest
RUN go install mvdan.cc/gofumpt@latest
RUN mkdir -p /root/.cache/sketch/webui
RUN apk add --no-cache build-base || true
# Set up any Go-specific environment
ENV CGO_ENABLED=1
# Install any additional Go tools that might be useful
RUN go install github.com/cweill/gotests/gotests@latest
RUN go install github.com/fatih/gomodifytags@latest
RUN go install github.com/josharian/impl@latest
RUN go install github.com/haya14busa/goplay/cmd/goplay@latest
RUN go install github.com/go-delve/delve/cmd/dlv@latest
ARG GIT_USER_EMAIL
ARG GIT_USER_NAME
RUN git config --global user.email "$GIT_USER_EMAIL" && \
git config --global user.name "$GIT_USER_NAME"
LABEL sketch_context="29f9694d78039a6a093f09ec31e8d1a19a6c75f5eb5c69dac6ac2395763b42e8"
COPY . /app
WORKDIR /app
RUN if [ -f go.mod ]; then go mod download; fi
CMD ["/bin/sketch"]