forked from nimiq/core-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile_deb
33 lines (26 loc) · 1.28 KB
/
Dockerfile_deb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
FROM node:9-stretch
# Get repo key and install it
RUN wget -qO - https://www.nimiq.com/nimiq-signing-key.pub | apt-key add -
# Install the repo
RUN echo "deb [arch=amd64] http://repo.nimiq.com/deb stable main" > /etc/apt/sources.list.d/nimiq.list
# Install dependencies
RUN apt-get update && apt-get -y upgrade
RUN apt-get install -y nimiq
# We're going to execute nimiq in the context of its own user, what else?
ENV USER=nimiq
# Create a working directory for the nimiq process
ENV DATA_PATH=/nimiq
RUN mkdir ${DATA_PATH} && chown ${USER}:root ${DATA_PATH}
WORKDIR ${DATA_PATH}
# Execute client as non-root user
USER ${USER}
# Just execute the nimiq process. One can customize the created container easily
# to one's needs by (at least) the following options:
# - supply your own arguments to the entrypoint while creating the container, e.g.
# docker run nimiq/nodejs-client --miner
# - just bind mount your own nimiq.conf to the container at /etc/nimiq/nimiq.conf
# then you can just create the container like (assuming the config is in the
# current working directory)
# docker run nimiq/nodejs-client -v $(pwd)/nimiq.conf:/etc/nimiq/nimiq.conf --config=/etc/nimiq.conf
# (- of course, you can combine and modify these options suitable to your needs)
ENTRYPOINT [ "/usr/bin/nimiq" ]