From 3388bd091260fd6091620e12c82e0f750738e9af Mon Sep 17 00:00:00 2001 From: Root-DE <58123348+Root-DE@users.noreply.github.com> Date: Sun, 18 Apr 2021 15:43:49 +0200 Subject: [PATCH 1/2] Update Dockerfile I had a few issues when trying to build the Dockerfile, however the changes here fixed the issue. --- Dockerfile | 32 ++------------------------------ 1 file changed, 2 insertions(+), 30 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1767688..0fff8dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,34 +1,6 @@ -FROM node:alpine AS base +FROM node +RUN npm install -g bhn bval bcrypto -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 From 9b326522f262f5c4fe97275d6aca75fdf0abbf8c Mon Sep 17 00:00:00 2001 From: Root-DE <58123348+Root-DE@users.noreply.github.com> Date: Sun, 18 Apr 2021 19:22:27 +0200 Subject: [PATCH 2/2] Update Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0fff8dd..168f1b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ 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" ] +HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "/usr/local/lib/node_modules/bhn/node_modules/.bin/bcoin-cli info >/dev/null" ]