Created
November 2, 2015 10:11
-
-
Save domachine/6ef4fc406bc4b5420c3b to your computer and use it in GitHub Desktop.
Dockerfile to run a couchapp with nodejs
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
| FROM klaemo/couchdb:1.6 | |
| RUN apt-get update -y \ | |
| && apt-get install -y --no-install-recommends \ | |
| python build-essential git-core | |
| # gpg keys listed at https://github.com/nodejs/node | |
| RUN set -ex \ | |
| && for key in \ | |
| 9554F04D7259F04124DE6B476D5A82AC7E37093B \ | |
| 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 \ | |
| 0034A06D9D9B0064CE8ADF6BF1747F4AD2306D93 \ | |
| FD3A5288F042B6850C66B31F09FE44734EB7990E \ | |
| 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 \ | |
| DD8F2338BAE7501E3DD5AC78C273792F7D83545D \ | |
| ; do \ | |
| gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \ | |
| done | |
| ENV NPM_CONFIG_LOGLEVEL info | |
| ENV NODE_VERSION 4.2.1 | |
| ENV NODE_ENV production | |
| RUN curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz" \ | |
| && curl -SLO "https://nodejs.org/dist/v$NODE_VERSION/SHASUMS256.txt.asc" \ | |
| && gpg --verify SHASUMS256.txt.asc \ | |
| && grep " node-v$NODE_VERSION-linux-x64.tar.gz\$" SHASUMS256.txt.asc | sha256sum -c - \ | |
| && tar -xzf "node-v$NODE_VERSION-linux-x64.tar.gz" -C /usr/local --strip-components=1 \ | |
| && rm "node-v$NODE_VERSION-linux-x64.tar.gz" SHASUMS256.txt.asc | |
| ADD . /usr/src/app | |
| WORKDIR /usr/src/app | |
| RUN npm install --unsafe-perm | |
| CMD ["npm", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment