forked from handshake-org/hsd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,16 @@ | ||
FROM node:alpine AS base | ||
RUN mkdir -p /code | ||
WORKDIR /code | ||
CMD "hsd" | ||
FROM node:10-alpine AS base | ||
WORKDIR /opt/hsd | ||
RUN apk add --no-cache bash unbound-dev gmp-dev | ||
COPY package.json /opt/hsd | ||
|
||
RUN apk upgrade --no-cache && \ | ||
apk add --no-cache bash unbound-dev gmp-dev | ||
|
||
COPY package.json \ | ||
#package-lock.json \ | ||
/code/ | ||
|
||
# Install build dependencies and compile | ||
# Install build dependencies and compile. | ||
FROM base AS build | ||
RUN apk add --no-cache g++ gcc make python2 | ||
RUN npm install --production | ||
|
||
FROM base | ||
ENV PATH="${PATH}:/code/bin:/code/node_modules/.bin" | ||
COPY --from=build /code/node_modules /code/node_modules/ | ||
COPY bin /code/bin/ | ||
COPY lib /code/lib/ | ||
ENV PATH="${PATH}:/opt/hsd/bin:/opt/hsd/node_modules/.bin" | ||
COPY --from=build /opt/hsd/node_modules /opt/hsd/node_modules/ | ||
COPY bin /opt/hsd/bin/ | ||
COPY lib /opt/hsd/lib/ | ||
ENTRYPOINT ["hsd"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters