Skip to content

Instantly share code, notes, and snippets.

@MayamaTakeshi
Created June 6, 2024 00:06
Show Gist options
  • Save MayamaTakeshi/12fff1bb976553e92ee4aa6174716ee3 to your computer and use it in GitHub Desktop.
Save MayamaTakeshi/12fff1bb976553e92ee4aa6174716ee3 to your computer and use it in GitHub Desktop.
Dockerfile to quickly test pjwebsock
FROM debian:bullseye
RUN apt update && apt install -y wget vim git gcc make gcc binutils build-essential cmake pkg-config
RUN mkdir -p /root/tmp
RUN cd /root/tmp && wget https://github.com/pjsip/pjproject/archive/refs/tags/2.14.1.tar.gz
RUN cd /root/tmp && tar -xf 2.14.1.tar.gz
RUN cd /root/tmp/pjproject-2.14.1 && export CFLAGS="$CFLAGS -fPIC" && ./configure && make dep && make && make install
RUN apt install -y uuid-dev
RUN <<EOF
cd /root/tmp
git clone https://github.com/jimying/pjwebsock
cd pjwebsock
git checkout a0616ea27f01d5e3bdfd5b801fb1499473a0b0cb
cmake .
make
EOF
CMD ["bash"]
# How to use it:
# docker build -t pjwebsock-test .
# docker run -it pjwebsock-test
# once inside the container, do:
# cd /root/tmp/pjwebsock/test
# ./test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment