forked from chainpoint/bitcoin-header-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
36 lines (27 loc) · 973 Bytes
/
Dockerfile
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
FROM node:alpine AS base
RUN mkdir /code
WORKDIR /code
# copy dependency information and package files
COPY package.json \
yarn.lock \
/code/
COPY bin /code/bin
COPY lib /code/lib
# intermediate image with dependencies needed for initial build
FROM base as build
# Install updates and dependencies needed to build the package
RUN apk upgrade --no-cache && \
apk add --no-cache git python make g++ bash && \
npm install -g -s --no-progress yarn
# Install package dependencies
RUN yarn install
# Copy built files, but don't include build deps
FROM base
ENV PATH="${PATH}:/code/bin:/code/node_modules/.bin"
COPY --from=build /code /code/
# start the header node. Can pass additional options with
# CMD in docker-compose or from command line with `docker run`
ENTRYPOINT ["bhn"]
# Main-net and Test-net
EXPOSE 8334 8333 8332 18334 18333 18332
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "bcoin-cli info >/dev/null" ]