-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-insight
56 lines (41 loc) · 1.3 KB
/
Dockerfile-insight
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#DOCKER_IMAGE_TAG=decred-insight
#mkdir -p .insight
#docker run -d --network=host -P -v $(pwd)/.insight/:/home/insight/.insight/ decred/$DOCKER_IMAGE_TAG
FROM debian:sid
LABEL description="Decrediton insight image"
LABEL version="1.0"
LABEL maintainer "[email protected]"
ENV NODE_VERSION v0.10.40
ENV INSIGHT_COMMIT=739eb5e5d33bf2a491e1d346cb8430bd2540eba2
ENV TERM linux
ENV USER insight
# create user
RUN adduser --disabled-password --gecos '' $USER
# update base distro & install build tooling
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -qy build-essential python git curl
# switch user
USER $USER
WORKDIR /home/$USER
ENV HOME /home/$USER
ENV NVM_DIR $HOME/.nvm
# install nodejs
RUN git clone https://github.com/creationix/nvm.git ~/.nvm && cd ~/.nvm && git checkout `git describe --abbrev=0 --tags` && \
. ~/.nvm/nvm.sh && \
nvm install $NODE_VERSION && \
nvm use $NODE_VERSION
RUN echo '. $HOME/.nvm/nvm.sh' >> ~/.bashrc
# install insight
RUN git clone https://github.com/decred/insight.git && \
cd insight && \
git checkout $INSIGHT_COMMIT && \
. ~/.nvm/nvm.sh && \
npm install
WORKDIR insight
EXPOSE 3003
ENV BITCOIND_USER user
ENV BITCOIND_PASS pass
ENV INSIGHT_NETWORK dcrdlivenet
ENV LOGGER_LEVEL error
CMD . ~/.nvm/nvm.sh && npm start