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
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.DS_Store
.ci
.cppcheck
.github
.idea
Dockerfile
docs-md
Readme.md
Doxyfile
.travis.yml
customdoxygen.css
run.sh
get_ssh_keys
.gitignore
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,7 @@ CMakeCache.txt
*build_info.h
config.h
docs
/.idea
id_rsa
id_rsa.pub
/logs
23 changes: 17 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
FROM debian
ENV LANG ru_RU.UTF-8
ENV TZ="Europe/Moscow"

COPY binaries/btpd /usr/local/bin/
RUN apt update && apt install -y libsnappy1v5
RUN groupadd -g 80 www \
&& useradd -u 30 --shell /sbin/nologin --group www wwwrun;
USER wwwrun

RUN apt -y install g++ cmake git wget
RUN groupadd -g 80 www && useradd -u 30 --shell /sbin/nologin --group www wwwrun;
RUN mkdir /bptd
COPY . /btpd/
RUN mkdir ~/.ssh
RUN chmod 700 ~/.ssh
COPY id_rsa /root/.ssh/
COPY id_rsa.pub /root/.ssh/
RUN chmod 600 /root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa.pub
RUN ssh-keyscan github.com >> /root/.ssh/known_hosts
RUN cd /btpd && make release
EXPOSE 38001 38001/udp 38000 38000/udp 37000 37001 37002 37003 37004
WORKDIR /btpd/
RUN rm /root/.ssh/id_rsa
RUN rm /root/.ssh/id_rsa.pub
CMD ["build/bin/btpd", "-C", "examples/simple/btp.conf"]
2 changes: 1 addition & 1 deletion examples/simple/btp.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
log = logs/btp.log

[db]
path=btp/
path=btp/storage/

# =======================================
[rt-udp]
Expand Down
3 changes: 3 additions & 0 deletions get_ssh_keys
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
cp ~/.ssh/id_rsa .
cp ~/.ssh/id_rsa.pub .