Compare commits
4 Commits
6253ed1f5f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
7761772dda
|
|||
|
28327d8604
|
|||
|
ed91f1ba49
|
|||
|
1f6e63ddad
|
14
README.md
14
README.md
@@ -16,7 +16,10 @@ Here are some example snippets to help you get started creating a container.
|
|||||||
version: "3"
|
version: "3"
|
||||||
services:
|
services:
|
||||||
pybitmessage:
|
pybitmessage:
|
||||||
image: bitdeals/pybitmessage
|
build:
|
||||||
|
context: https://git.bitdeals.org/private/bitmessage.git
|
||||||
|
dockerfile: ./docker/Dockerfile
|
||||||
|
image: registry.bitdeals.org/bitmessage
|
||||||
environment:
|
environment:
|
||||||
- BITMESSAGE_API_USER=bitmessage_api_user
|
- BITMESSAGE_API_USER=bitmessage_api_user
|
||||||
- BITMESSAGE_API_PASSWORD=bitmessage_api_password
|
- BITMESSAGE_API_PASSWORD=bitmessage_api_password
|
||||||
@@ -39,7 +42,7 @@ docker run -d \
|
|||||||
-e BITMESSAGE_TTL=172800 \
|
-e BITMESSAGE_TTL=172800 \
|
||||||
-e BITMESSAGE_STOPRESENDINGAFTERXDAYS=60
|
-e BITMESSAGE_STOPRESENDINGAFTERXDAYS=60
|
||||||
-p 8442:8442 \
|
-p 8442:8442 \
|
||||||
bitdeals/pybitmessage
|
registry.bitdeals.org/bitmessage
|
||||||
```
|
```
|
||||||
|
|
||||||
# Parameters
|
# Parameters
|
||||||
@@ -48,11 +51,12 @@ Container images are configured using parameters passed at runtime.
|
|||||||
|
|
||||||
|Parameter|Function|
|
|Parameter|Function|
|
||||||
|:--------|:-------|
|
|:--------|:-------|
|
||||||
|-p 8442|XML-RPC API port TCP|
|
|-p 8442|API port|
|
||||||
|-e BITMESSAGE_API_USER=|XML-RPC API user. Default: `bitmessage_api_user`|
|
|-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_API_PASSWORD|XML-RPC API password. Default: `bitmessage_api_password`|
|
||||||
|-e BITMESSAGE_SEED_PHRASE|Create Deterministic Addresses password. Default: created randomly. |
|
|-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_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_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_STOPRESENDINGAFTERXDAYS|Stop resending unreceived message after X days. Default: `60`|
|
||||||
|
|-e BITMESSAGE_APIVARIANT|provides xml or json-RPC API. Default: `legacy`|
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
bitmessage:
|
bitmessage:
|
||||||
image: bitdeals/pybitmessage:0.6.3.2-ubuntu
|
build:
|
||||||
build: ./docker
|
context: ./docker
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
image: registry.bitdeals.org/bitmessage
|
||||||
environment:
|
environment:
|
||||||
- BITMESSAGE_API_USER=bitmessage_api_user
|
- BITMESSAGE_API_USER=bitmessage_api_user
|
||||||
- BITMESSAGE_API_PASSWORD=bitmessage_api_password
|
- BITMESSAGE_API_PASSWORD=bitmessage_api_password
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ RUN apt-get install -yq --no-install-suggests --no-install-recommends \
|
|||||||
python-all-dev python-msgpack python-pip python-setuptools \
|
python-all-dev python-msgpack python-pip python-setuptools \
|
||||||
git
|
git
|
||||||
|
|
||||||
|
## Do not use cache when building next layers of the image.
|
||||||
|
ARG NOCACHE=0
|
||||||
|
|
||||||
WORKDIR /root/PyBitmessage
|
WORKDIR /root/PyBitmessage
|
||||||
RUN git clone https://github.com/Bitmessage/PyBitmessage .
|
RUN git clone https://github.com/Bitmessage/PyBitmessage .
|
||||||
|
|
||||||
@@ -19,7 +22,7 @@ RUN pip2 install jsonrpclib .
|
|||||||
|
|
||||||
FROM ubuntu:bionic
|
FROM ubuntu:bionic
|
||||||
|
|
||||||
EXPOSE 8442
|
EXPOSE 8442/tcp
|
||||||
|
|
||||||
ENV USER_UID=2000
|
ENV USER_UID=2000
|
||||||
ENV USER_GID=2000
|
ENV USER_GID=2000
|
||||||
@@ -27,9 +30,9 @@ ENV HOME=/home/bitmessage
|
|||||||
ENV BITMESSAGE_HOME=${HOME}
|
ENV BITMESSAGE_HOME=${HOME}
|
||||||
|
|
||||||
COPY --from=0 /usr/local/ /usr/local/
|
COPY --from=0 /usr/local/ /usr/local/
|
||||||
COPY --from=0 /root/PyBitmessage/docker/healthy_check.py /usr/local/bin/
|
COPY ./docker/healthy_check.py /usr/local/bin/
|
||||||
COPY --from=0 /root/PyBitmessage/docker/seed_addr_gen.py /usr/local/bin/
|
COPY ./docker/seed_addr_gen.py /usr/local/bin/
|
||||||
COPY --from=0 /root/PyBitmessage/docker/run.sh /usr/local/bin/
|
COPY ./docker/run.sh /usr/local/bin/
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN apt-get update \
|
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_API_PORT=${BITMESSAGE_API_PORT:-8442}
|
||||||
export BITMESSAGE_TTL=${BITMESSAGE_TTL:-172800}
|
export BITMESSAGE_TTL=${BITMESSAGE_TTL:-172800}
|
||||||
export BITMESSAGE_STOPRESENDINGAFTERXDAYS=${BITMESSAGE_STOPRESENDINGAFTERXDAYS:-30}
|
export BITMESSAGE_STOPRESENDINGAFTERXDAYS=${BITMESSAGE_STOPRESENDINGAFTERXDAYS:-30}
|
||||||
|
export BITMESSAGE_APIVARIANT=${BITMESSAGE_APIVARIANT:-legacy}
|
||||||
|
|
||||||
SEED_FILE="address_seed.txt"
|
SEED_FILE="address_seed.txt"
|
||||||
test -e "$SEED_FILE" || gosu bitmessage touch "$SEED_FILE"
|
test -e "$SEED_FILE" || gosu bitmessage touch "$SEED_FILE"
|
||||||
@@ -28,7 +29,7 @@ chmod 600 keys.dat
|
|||||||
|
|
||||||
# set config values
|
# set config values
|
||||||
gosu bitmessage sed -i -e "s|\(apiinterface = \).*|\10\.0\.0\.0|g" \
|
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|\(apiusername = \).*|\1$BITMESSAGE_API_USER|g" \
|
||||||
-e "s|\(apipassword = \).*|\1$BITMESSAGE_API_PASSWORD|g" \
|
-e "s|\(apipassword = \).*|\1$BITMESSAGE_API_PASSWORD|g" \
|
||||||
-e "s|\(apiport = \).*|\1$BITMESSAGE_API_PORT|g" \
|
-e "s|\(apiport = \).*|\1$BITMESSAGE_API_PORT|g" \
|
||||||
|
|||||||
Reference in New Issue
Block a user