-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (17 loc) · 706 Bytes
/
Dockerfile
File metadata and controls
27 lines (17 loc) · 706 Bytes
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
FROM python:3.12-slim
ENV ANTLR_VERSION=4.13.2
RUN apt-get update && apt-get install -y \
openjdk-17-jre-headless \
curl \
gcc \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
RUN curl -L -o /usr/local/lib/antlr4.jar https://www.antlr.org/download/antlr-${ANTLR_VERSION}-complete.jar
RUN echo '#!/bin/sh\nexec java -jar /usr/local/lib/antlr4.jar "$@"' > /usr/local/bin/antlr4 && \
chmod +x /usr/local/bin/antlr4
RUN pip install --break-system-packages antlr4-python3-runtime
RUN echo 'alias antlr4="java -jar /usr/local/lib/antlr4.jar"' >> /etc/bash.bashrc && \
echo 'alias python="python3"' >> /etc/bash.bashrc
WORKDIR /work
COPY . /work
VOLUME ["/work"]
CMD ["/bin/bash"]