blob: 0ae81e9707d74c622371ac0392ceaf0d823a3e4f [file] [log] [blame]
David Crawshaw5228b582025-05-01 11:18:12 -07001FROM ghcr.io/boldsoftware/sketch:86ef7a672f85139e73f38d4cdf78d95f
Earl Lee2e463fb2025-04-17 11:22:22 -07002
3ARG GIT_USER_EMAIL
4ARG GIT_USER_NAME
5
6RUN git config --global user.email "$GIT_USER_EMAIL" && \
7 git config --global user.name "$GIT_USER_NAME"
8
David Crawshaw5228b582025-05-01 11:18:12 -07009LABEL sketch_context="5820b50cae54d2fbdd28081f960dcfac4367f8d805030ecd612a13ebeef13bb1"
Earl Lee2e463fb2025-04-17 11:22:22 -070010COPY . /app
11
12WORKDIR /app
13RUN if [ -f go.mod ]; then go mod download; fi
14
David Crawshaw5228b582025-05-01 11:18:12 -070015RUN --mount=type=cache,target=/var/cache/apt \
16 set -eux; \
17 apt-get update && \
18 apt-get install -y --no-install-recommends python3-pip python3-venv || true
Josh Bleecher Snyderc76a3922025-05-01 01:18:56 +000019
David Crawshaw5228b582025-05-01 11:18:12 -070020# Set up Python environment, allowing failures to not stop the build
21RUN python3 -m pip install --upgrade pip || true
Josh Bleecher Snyderc76a3922025-05-01 01:18:56 +000022
David Crawshaw5228b582025-05-01 11:18:12 -070023# Install any Go tools specific to this project if needed
24RUN --mount=type=cache,target=/go/pkg/mod \
25 --mount=type=cache,target=/root/.cache/go-build \
26 go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest || true
David Crawshaw11129492025-04-25 20:41:53 -070027
28CMD ["/bin/sketch"]