Compare commits
7 Commits
e270e0f616
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
7761772dda
|
|||
|
28327d8604
|
|||
|
ed91f1ba49
|
|||
|
1f6e63ddad
|
|||
|
6253ed1f5f
|
|||
|
9a88767eaf
|
|||
|
7ed94e64f3
|
16
README.md
16
README.md
@@ -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`|
|
||||
|-e BITMESSAGE_SEED_PHRASE|Create Deterministic Addresses password. Default: `bitmessage_seed_phrase`|
|
||||
|-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`|
|
||||
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
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
|
||||
- BITMESSAGE_SEED_PHRASE=bitmessage_seed_phrase
|
||||
- BITMESSAGE_SEED_PHRASE=
|
||||
- BITMESSAGE_SEED_ADDRESSES=1
|
||||
- BITMESSAGE_TTL=172800
|
||||
- BITMESSAGE_STOPRESENDINGAFTERXDAYS=60
|
||||
|
||||
@@ -11,15 +11,18 @@ 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 .
|
||||
|
||||
# Install
|
||||
RUN pip2 install jsonrpclib .
|
||||
|
||||
FROM ubuntu:bionic-20220401
|
||||
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 \
|
||||
|
||||
@@ -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" \
|
||||
|
||||
Reference in New Issue
Block a user