Compare commits

...

4 Commits

Author SHA1 Message Date
7761772dda add registry 2025-03-19 14:12:45 +03:00
28327d8604 add apivariant 2024-11-29 13:40:12 +03:00
ed91f1ba49 add NOCACHE arg 2024-11-15 15:51:29 +03:00
1f6e63ddad dockerfile fix 2024-11-03 13:49:16 +03:00
4 changed files with 22 additions and 12 deletions

View File

@@ -16,7 +16,10 @@ Here are some example snippets to help you get started creating a container.
version: "3"
services:
pybitmessage:
image: bitdeals/pybitmessage
build:
context: https://git.bitdeals.org/private/bitmessage.git
dockerfile: ./docker/Dockerfile
image: registry.bitdeals.org/bitmessage
environment:
- BITMESSAGE_API_USER=bitmessage_api_user
- BITMESSAGE_API_PASSWORD=bitmessage_api_password
@@ -39,7 +42,7 @@ docker run -d \
-e BITMESSAGE_TTL=172800 \
-e BITMESSAGE_STOPRESENDINGAFTERXDAYS=60
-p 8442:8442 \
bitdeals/pybitmessage
registry.bitdeals.org/bitmessage
```
# Parameters
@@ -48,11 +51,12 @@ Container images are configured using parameters passed at runtime.
|Parameter|Function|
|:--------|:-------|
|-p 8442|XML-RPC API port TCP|
|-e BITMESSAGE_API_USER=|XML-RPC API user. Default: `bitmessage_api_user`|
|-e BITMESSAGE_API_PASSWORD=|XML-RPC API password. Default: `bitmessage_api_password`|
|-p 8442|API port|
|-e BITMESSAGE_API_USER|XML-RPC API user. Default: `bitmessage_api_user`|
|-e BITMESSAGE_API_PASSWORD|XML-RPC API password. Default: `bitmessage_api_password`|
|-e BITMESSAGE_SEED_PHRASE|Create Deterministic Addresses password. Default: created randomly. |
|-e BITMESSAGE_SEED_ADDRESSES|Number of Deterministic Addresses to generate. Default: `1`|
|-e BITMESSAGE_TTL|The expiration of newly send messages, in seconds. Default: `172800`|
|-e BITMESSAGE_STOPRESENDINGAFTERXDAYS|Stop resending unreceived message after X days. Default: `60`|
|-e BITMESSAGE_APIVARIANT|provides xml or json-RPC API. Default: `legacy`|

View File

@@ -1,7 +1,9 @@
services:
bitmessage:
image: bitdeals/pybitmessage:0.6.3.2-ubuntu
build: ./docker
build:
context: ./docker
dockerfile: Dockerfile
image: registry.bitdeals.org/bitmessage
environment:
- BITMESSAGE_API_USER=bitmessage_api_user
- BITMESSAGE_API_PASSWORD=bitmessage_api_password

View File

@@ -11,6 +11,9 @@ RUN apt-get install -yq --no-install-suggests --no-install-recommends \
python-all-dev python-msgpack python-pip python-setuptools \
git
## Do not use cache when building next layers of the image.
ARG NOCACHE=0
WORKDIR /root/PyBitmessage
RUN git clone https://github.com/Bitmessage/PyBitmessage .
@@ -19,7 +22,7 @@ RUN pip2 install jsonrpclib .
FROM ubuntu:bionic
EXPOSE 8442
EXPOSE 8442/tcp
ENV USER_UID=2000
ENV USER_GID=2000
@@ -27,9 +30,9 @@ ENV HOME=/home/bitmessage
ENV BITMESSAGE_HOME=${HOME}
COPY --from=0 /usr/local/ /usr/local/
COPY --from=0 /root/PyBitmessage/docker/healthy_check.py /usr/local/bin/
COPY --from=0 /root/PyBitmessage/docker/seed_addr_gen.py /usr/local/bin/
COPY --from=0 /root/PyBitmessage/docker/run.sh /usr/local/bin/
COPY ./docker/healthy_check.py /usr/local/bin/
COPY ./docker/seed_addr_gen.py /usr/local/bin/
COPY ./docker/run.sh /usr/local/bin/
# Install dependencies
RUN apt-get update \

View File

@@ -6,6 +6,7 @@ export BITMESSAGE_SEED_ADDRESSES=${BITMESSAGE_SEED_ADDRESSES:-1}
export BITMESSAGE_API_PORT=${BITMESSAGE_API_PORT:-8442}
export BITMESSAGE_TTL=${BITMESSAGE_TTL:-172800}
export BITMESSAGE_STOPRESENDINGAFTERXDAYS=${BITMESSAGE_STOPRESENDINGAFTERXDAYS:-30}
export BITMESSAGE_APIVARIANT=${BITMESSAGE_APIVARIANT:-legacy}
SEED_FILE="address_seed.txt"
test -e "$SEED_FILE" || gosu bitmessage touch "$SEED_FILE"
@@ -28,7 +29,7 @@ chmod 600 keys.dat
# set config values
gosu bitmessage sed -i -e "s|\(apiinterface = \).*|\10\.0\.0\.0|g" \
-e "s|\(apivariant = \).*|\1legacy|g" \
-e "s|\(apivariant = \).*|\1$BITMESSAGE_APIVARIANT|g" \
-e "s|\(apiusername = \).*|\1$BITMESSAGE_API_USER|g" \
-e "s|\(apipassword = \).*|\1$BITMESSAGE_API_PASSWORD|g" \
-e "s|\(apiport = \).*|\1$BITMESSAGE_API_PORT|g" \