This file contains hidden or 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 will be referred as 0 | |
FROM <NAME> | |
... | |
# This will be referred as 1 | |
FROM <NAME> | |
... | |
FROM <NAME> | |
COPY --from=0 /home/node/app . |
This file contains hidden or 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
# Using node as intermediate to build | |
FROM node:8.9.3 as build-image | |
LABEL maintainer Narat S <[email protected]> | |
WORKDIR /home/node/app | |
COPY . ./ | |
RUN npm install | |
RUN npm run build |
This file contains hidden or 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
const retryPromise = require("./retry-promise"); | |
// Execution example | |
retryPromise(doSomething, 5, 1000) | |
.then(() => { | |
console.log("SUCCEED!"); | |
}) | |
.catch(() => { | |
console.log("FAILED! after those tries, I gave up."); | |
}); |