forked from kelektiv/node.bcrypt.js
-
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
5 changed files
with
119 additions
and
2 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
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Usage: | ||
# | ||
# docker build -t bcryptjs-linux-alpine-builder -f Dockerfile-alpine . | ||
# CONTAINER=$(docker create bcryptjs-linux-alpine-builder) | ||
# # Then copy the artifact to your host: | ||
# docker cp "$CONTAINER:/usr/local/opt/bcrypt-js/prebuilds" . | ||
# docker rm "$CONTAINER" | ||
|
||
FROM node:14-alpine | ||
|
||
ENV project bcrypt-js | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG ${LC_ALL} | ||
|
||
RUN echo "#log: ${project}: Setup system" \ | ||
&& set -x \ | ||
&& apk add --update build-base python3 \ | ||
&& npm i -g prebuildify node-gyp nodeunit \ | ||
&& sync | ||
|
||
ADD . /usr/local/opt/${project} | ||
WORKDIR /usr/local/opt/${project} | ||
|
||
RUN echo "#log: ${project}: Running build" \ | ||
&& set -x \ | ||
&& npm ci \ | ||
&& npm run build | ||
|
||
ARG RUN_TESTS=true | ||
|
||
RUN if "${RUN_TESTS}"; then \ | ||
echo "#log ${project}: Running tests" \ | ||
&& npm test; \ | ||
else \ | ||
echo "#log ${project}: Tests were skipped!"; \ | ||
fi | ||
|
||
CMD /bin/bash -l |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Usage: | ||
# | ||
# docker build -t bcryptjs-alpine-arm-builder -f Dockerfile-arm . | ||
# CONTAINER=$(docker create bcryptjs-alpine-arm-builder) | ||
# # Then copy the artifact to your host: | ||
# docker cp "$CONTAINER:/usr/local/opt/bcrypt-js/prebuilds" . | ||
# docker rm "$CONTAINER" | ||
|
||
FROM arm32v7/node:14-alpine | ||
|
||
ENV project bcrypt-js | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG ${LC_ALL} | ||
|
||
RUN echo "#log: ${project}: Setup system" \ | ||
&& set -x \ | ||
&& apk add --update build-base python3 \ | ||
&& npm i -g prebuildify node-gyp nodeunit \ | ||
&& sync | ||
|
||
ADD . /usr/local/opt/${project} | ||
WORKDIR /usr/local/opt/${project} | ||
|
||
RUN echo "#log: ${project}: Running build" \ | ||
&& set -x \ | ||
&& npm ci \ | ||
&& npm run build | ||
|
||
ARG RUN_TESTS=true | ||
|
||
RUN if "${RUN_TESTS}"; then \ | ||
echo "#log ${project}: Running tests" \ | ||
&& npm test; \ | ||
else \ | ||
echo "#log ${project}: Tests were skipped!"; \ | ||
fi | ||
|
||
CMD /bin/bash -l |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Usage: | ||
# | ||
# docker build -t bcryptjs-alpine-arm-builder -f Dockerfile-arm . | ||
# CONTAINER=$(docker create bcryptjs-alpine-arm-builder) | ||
# # Then copy the artifact to your host: | ||
# docker cp "$CONTAINER:/usr/local/opt/bcrypt-js/prebuilds" . | ||
# docker rm "$CONTAINER" | ||
|
||
FROM arm64v8/node:14-alpine | ||
|
||
ENV project bcrypt-js | ||
ENV DEBIAN_FRONTEND noninteractive | ||
ENV LC_ALL en_US.UTF-8 | ||
ENV LANG ${LC_ALL} | ||
|
||
RUN echo "#log: ${project}: Setup system" \ | ||
&& set -x \ | ||
&& apk add --update build-base python3 \ | ||
&& npm i -g prebuildify node-gyp nodeunit \ | ||
&& sync | ||
|
||
ADD . /usr/local/opt/${project} | ||
WORKDIR /usr/local/opt/${project} | ||
|
||
RUN echo "#log: ${project}: Running build" \ | ||
&& set -x \ | ||
&& npm ci \ | ||
&& npm run build | ||
|
||
ARG RUN_TESTS=true | ||
|
||
RUN if "${RUN_TESTS}"; then \ | ||
echo "#log ${project}: Running tests" \ | ||
&& npm test; \ | ||
else \ | ||
echo "#log ${project}: Tests were skipped!"; \ | ||
fi | ||
|
||
CMD /bin/bash -l |
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