-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
43 lines (33 loc) · 1.05 KB
/
Copy pathDockerfile
File metadata and controls
43 lines (33 loc) · 1.05 KB
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
FROM ubuntu:20.04
# Avoid interactive prompts during build
ENV DEBIAN_FRONTEND=noninteractive
# Install build dependencies
RUN apt-get update && apt-get install -y \
software-properties-common \
wget \
gnupg2 \
&& rm -rf /var/lib/apt/lists/*
# Add Kamailio repository
RUN wget -O- https://packages.kamailio.org/kamailio54_key.asc | apt-key add - \
&& echo "deb http://packages.kamailio.org/ubuntu focal main" > /etc/apt/sources.list.d/kamailio.list
# Install Kamailio development packages and build tools
RUN apt-get update && apt-get install -y \
kamailio-dev \
libcurl4-openssl-dev \
build-essential \
gcc \
make \
&& rm -rf /var/lib/apt/lists/*
# Set working directory
WORKDIR /build
# Copy source files
COPY web3_auth_fixed.c web3_auth.c
COPY Makefile .
# Update Makefile for system headers
RUN sed -i 's|KAMAILIO_PATH.*|KAMAILIO_INCLUDE = /usr/include/kamailio|' Makefile
# Build the module
RUN make
# Create output directory
RUN mkdir -p /output
# Copy the built module to output
CMD ["cp", "web3_auth.so", "/output/"]