-
Notifications
You must be signed in to change notification settings - Fork 4.3k
/
Dockerfile
29 lines (25 loc) · 833 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
FROM golang:1.20
WORKDIR /go/src/github.com/github/linguist/tools/grammars
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get update && \
apt-get install -y nodejs cmake && \
npm install -g season && \
cd /tmp && git clone https://github.com/vmg/pcre && \
mkdir -p /tmp/pcre/build && cd /tmp/pcre/build && \
cmake .. \
-DPCRE_SUPPORT_JIT=ON \
-DPCRE_SUPPORT_UTF=ON \
-DPCRE_SUPPORT_UNICODE_PROPERTIES=ON \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_C_FLAGS="-fPIC $(EXTRA_PCRE_CFLAGS)" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DPCRE_BUILD_PCRECPP=OFF \
-DPCRE_BUILD_PCREGREP=OFF \
-DPCRE_BUILD_TESTS=OFF \
-G "Unix Makefiles" && \
make && make install && \
rm -rf /tmp/pcre && \
rm -rf /var/lib/apt/lists/*
COPY . .
RUN go install ./cmd/grammar-compiler
ENTRYPOINT ["grammar-compiler"]