forked from Tribler/tribler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
105 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: docker-build | ||
|
||
on: workflow_dispatch | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Build and export | ||
uses: docker/build-push-action@v6 | ||
with: | ||
tags: tribler:latest | ||
outputs: type=docker,dest=/tmp/myimage.tar | ||
file: build/docker/build.Dockerfile | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: myimage | ||
path: /tmp/myimage.tar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# libtorrent-1.2.19 does not support python 3.11 yet | ||
FROM python:3.10-slim | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends libsodium23=1.0.18-1 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Then, install pip dependencies so that it can be cached and does not | ||
# need to be built every time the source code changes. | ||
# This reduces the docker build time. | ||
COPY ./pyipv8/requirements.txt /app/tribler/pyipv8/requirements.txt | ||
COPY ./requirements.txt /app/tribler/requirements.txt | ||
RUN pip3 install -r /app/tribler/requirements.txt | ||
|
||
RUN useradd -ms /bin/bash user | ||
|
||
# Create default state and download directories and set the permissions | ||
RUN chown -R user:user /app | ||
RUN mkdir /state /downloads && chown -R user:user /state /downloads | ||
|
||
# Copy the source code and set the working directory | ||
COPY ./src /app/tribler/src/ | ||
WORKDIR /app/tribler/ | ||
|
||
ENV CORE_API_PORT=20100 | ||
ENV TSTATEDIR=/state | ||
|
||
VOLUME /state | ||
VOLUME /downloads | ||
COPY ./build/docker/configuration.json /state/git/configuration.json | ||
|
||
USER user | ||
|
||
CMD exec python3 /app/tribler/src/run_tribler.py | ||
Check warning on line 34 in build/docker/build.Dockerfile GitHub Actions / buildJSON arguments recommended for ENTRYPOINT/CMD to prevent unintended behavior related to OS signals
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.* | ||
build | ||
doc | ||
scripts | ||
|
||
src/run_unit_tests.py | ||
src/tribler/test_integration | ||
src/tribler/test_unit | ||
|
||
pyipv8/.* | ||
pyipv8/*.md | ||
pyipv8/*.ini | ||
pyipv8/create_setup_taskmanager.py | ||
pyipv8/create_test_coverage_report.py | ||
pyipv8/github_increment_version.py | ||
pyipv8/run_all_tests.py | ||
pyipv8/setup.py | ||
pyipv8/doc | ||
pyipv8/scripts | ||
pyipv8/stresstest | ||
pyipv8/systemd | ||
pyipv8/ipv8/test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"api": { | ||
"http_host": "127.0.0.1", | ||
"https_host": "127.0.0.1" | ||
}, | ||
"ipv8": { | ||
"interfaces": [ | ||
{ | ||
"interface": "UDPIPv4", | ||
"ip": "0.0.0.0", | ||
"port": 7759, | ||
"worker_threads": 8 | ||
}, | ||
{ | ||
"interface": "UDPIPv6", | ||
"ip": "::", | ||
"port": 7760 | ||
} | ||
] | ||
}, | ||
"libtorrent": { | ||
"port": 0, | ||
"download_defaults": { | ||
"saveas": "/downloads" | ||
} | ||
}, | ||
"state_dir": "/state" | ||
} |