Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# This docker-compose file doesn't work yet.
version: '3.9'
services:
rldp-proxy:
Expand All @@ -18,6 +17,9 @@ services:
- TON_PROXY_PROXY_ALL
command: /app/entrypoint.sh
secrets: [ adnl, adnl-hex, adnl-private, global-config ]
ports:
- "8080:8080"
restart: always
secrets:
adnl:
file: private/adnl
Expand Down
26 changes: 14 additions & 12 deletions rldp-http-proxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
# Stage 1: Build
FROM ubuntu:20.04 as builder

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata && \
apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev pkg-config liblz4-dev libsecp256k1-dev libsodium-dev

RUN apt install -y build-essential cmake clang openssl libssl-dev zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev pkg-config

# build tonlib
# Build tonlib
WORKDIR /

# remove /tree/<commit> to build master branch
ARG TON_REPO_BRANCH=master
RUN echo "Branch: ${TON_REPO_BRANCH}" && \
git clone --recurse-submodules https://github.com/ton-blockchain/ton.git && \
cd /ton && git checkout ${TON_REPO_BRANCH}
cd /ton && git checkout ${TON_REPO_BRANCH}

# fix lib version and patch logging
# Fix lib version and patch logging
WORKDIR /ton
RUN mkdir /ton/build
WORKDIR /ton/build
Expand All @@ -23,18 +22,21 @@ ENV CXX clang++
RUN cmake -DCMAKE_BUILD_TYPE=Release ..
RUN cmake --build . -j$(nproc) --target rldp-http-proxy generate-random-id


# Stage 2: Final image
FROM ubuntu:20.04

RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata && \
apt install -y openssl libssl-dev wget curl libatomic1 zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev libsecp256k1-0 libsodium23

RUN apt install -y openssl libssl-dev wget curl libatomic1 zlib1g-dev gperf wget git curl libreadline-dev ccache libmicrohttpd-dev
WORKDIR /app

COPY --from=builder /ton/build/rldp-http-proxy/rldp-http-proxy /app/rldp-http-proxy
COPY --from=builder /ton/build/utils/generate-random-id /app/generate-random-id

RUN chmod +x /app/rldp-http-proxy && chmod +x /app/generate-random-id

COPY entrypoint.sh /app
COPY generate_adnl.sh /app

ENTRYPOINT [ "/bin/bash" ]