From 108171f8bebf69886b4b5f848a9d7e81515d11d8 Mon Sep 17 00:00:00 2001 From: Shiham Abdul Rahman Date: Sat, 24 Sep 2022 03:47:01 +0500 Subject: [PATCH] Dockerfile --- Dockerfile | 17 +++++++++++++++++ docker-compose.yml | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 Dockerfile create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..54d3d3e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM lwthiker/curl-impersonate + +WORKDIR /root + +COPY . . + +RUN apt update \ + && apt install curl build-essential libssl-dev pkg-config -y --no-install-recommends + +RUN curl https://sh.rustup.rs -o rust \ + && sh rust -y +RUN /bin/bash -c "cargo build --release" +RUN apt purge curl build-essential libssl-dev pkg-config cargo -y + +RUN mv /root/target/release/bml_proxy . +RUN rm -rf Cargo.lock Dockerfile docker-compose.yml rustup .cargo target .git .gitignore .rustup +CMD ["./bml_proxy"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..8c40e40 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.5' +services: +######################### + bmlapi-proxy: + build: . + image: bmlapi-proxy + ports: + - 3030:3030 + environment: + - CURL_IMPERSONATE=chrome101 + - LD_PRELOAD=/usr/lib/libcurl-impersonate-chrome.so + restart: always