-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathDockerfile
More file actions
46 lines (34 loc) · 867 Bytes
/
Dockerfile
File metadata and controls
46 lines (34 loc) · 867 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Build stage
FROM ubuntu:24.04 AS builder
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt-get update && apt-get install -y \
build-essential \
clang \
git \
curl \
python3 \
python3-pip \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
# Install Bazelisk
RUN npm install -g @bazel/bazelisk
# Set working directory
WORKDIR /workspace
# Copy source files
COPY . .
# Build JSIR
RUN bazelisk build //maldoca/js/ir:jsir_gen
# Runtime stage
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y \
libstdc++6 \
python3 \
&& rm -rf /var/lib/apt/lists/*
# Copy binary from builder
COPY --from=builder /workspace/bazel-bin/maldoca/js/ir/jsir_gen /usr/local/bin/jsir_gen
# Copy examples
COPY --from=builder /workspace/maldoca/js/ir/conversion/tests /examples
WORKDIR /workspace
CMD ["/bin/bash"]