Skip to content

Commit

Permalink
Updated semgrep to v1.104 and fixed docker build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sflanker committed Jan 26, 2025
1 parent b416c03 commit d44e522
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,32 @@ ARG ALPINE_VERSION=3.20
# Semgrep build is currently broken on alpine > 3.19
FROM alpine:3.19 AS build-semgrep-core

ARG SEMGREP_VERSION=v1.85.0

RUN apk add --no-cache bash build-base git make opam

RUN opam init --compiler=4.14.0 --disable-sandboxing --no
RUN opam switch 4.14.0

WORKDIR /src

ARG SEMGREP_VERSION=v1.104.0

RUN git clone --recurse-submodules --branch ${SEMGREP_VERSION} --depth=1 --single-branch https://github.com/semgrep/semgrep

WORKDIR /src/semgrep

ARG OPAMSOLVERTIMEOUT=600

# note that we do not run 'make install-deps-for-semgrep-core' here because it
# configures and builds ocaml-tree-sitter-core too; here we are
# just concerned about installing external packages to maximize docker caching.
RUN make install-deps-ALPINE-for-semgrep-core && \
make install-opam-deps
RUN make install-deps-ALPINE-for-semgrep-core

RUN apk add --no-cache zstd libpsl-dev

RUN apk add --no-cache zstd libpsl-utils
ARG OPAMSOLVERTIMEOUT=1800

# TODO: add --mount=type=cache,...
RUN make install-deps-for-semgrep-core

ENV LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib
ARG DUNE_PROFILE=release

RUN eval "$(opam env)" && \
Expand Down

0 comments on commit d44e522

Please sign in to comment.