summaryrefslogtreecommitdiffstats
path: root/Dockerfile
diff options
context:
space:
mode:
authorStephen Moloney <stephenmoloney@live.com>2017-01-17 08:49:42 +0000
committerStephen Moloney <stephenmoloney@live.com>2017-01-17 08:49:42 +0000
commit692f5fb10c60f8b933c3fbcfd549c5db2f9b7058 (patch)
tree98d95a0484620e859602e3478eccc53fbf1ff277 /Dockerfile
parentd619921d9c85f7cb30e9022c94b170bc1e571b47 (diff)
downloadwekan-692f5fb10c60f8b933c3fbcfd549c5db2f9b7058.tar.gz
wekan-692f5fb10c60f8b933c3fbcfd549c5db2f9b7058.tar.bz2
wekan-692f5fb10c60f8b933c3fbcfd549c5db2f9b7058.zip
locally build docker image
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile76
1 files changed, 70 insertions, 6 deletions
diff --git a/Dockerfile b/Dockerfile
index 591d8ca2..7dea33ed 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,71 @@
-FROM meteorhacks/meteord:onbuild
-MAINTAINER Maxime Quandalle <mquandalle@wekan.io>
+FROM debian:wheezy
+MAINTAINER wefork
-# Run as you wish!
-# docker run -d --name wekan-db mongo
-# docker run -d --link "wekan-db:db" -e "MONGO_URL=mongodb://db" \
-# -e "ROOT_URL=http://example.com" -p 8080:80 mquandalle/wekan
+ENV BUILD_DEPS="wget curl bzip2 build-essential python git"
+ARG NODE_VERSION=v0.10.48
+ARG METEOR_RELEASE=1.3.5.1
+ARG NPM_VERSION=3.10.10
+ARG ARCHICTECTURE=linux-x64
+ARG SRC_PATH=./
+
+# Copy the app to the image
+COPY ${SRC_PATH} ./app
+
+# OS dependencies
+RUN apt-get update -y && apt-get install -y ${BUILD_DEPS}
+
+# Download nodejs
+RUN wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-${ARCHICTECTURE}.tar.gz && \
+ wget https://nodejs.org/dist/${NODE_VERSION}/SHASUMS256.txt.asc
+
+# Verify nodejs authenticity
+RUN \
+ grep ${NODE_VERSION}-${ARCHICTECTURE}.tar.gz SHASUMS256.txt.asc | shasum -a 256 -c - && \
+ gpg --keyserver pool.sks-keyservers.net --recv-keys 9554F04D7259F04124DE6B476D5A82AC7E37093B && \
+ gpg --keyserver pool.sks-keyservers.net --recv-keys 94AE36675C464D64BAFA68DD7434390BDBE9B9C5 && \
+ gpg --keyserver pool.sks-keyservers.net --recv-keys FD3A5288F042B6850C66B31F09FE44734EB7990E && \
+ gpg --keyserver pool.sks-keyservers.net --recv-keys 71DCFD284A79C3B38668286BC97EC7A07EDE3FC1 && \
+ gpg --keyserver pool.sks-keyservers.net --recv-keys DD8F2338BAE7501E3DD5AC78C273792F7D83545D && \
+ gpg --keyserver pool.sks-keyservers.net --recv-keys C4F0DFFF4E8C1A8236409D08E73BC641CC11F4C8 && \
+ gpg --keyserver pool.sks-keyservers.net --recv-keys B9AE9905FFD7803F25714661B63B535A4C206CA9 && \
+ gpg --refresh-keys pool.sks-keyservers.net && \
+ gpg --verify SHASUMS256.txt.asc
+
+# Install Node
+RUN \
+ tar xvzf node-${NODE_VERSION}-${ARCHICTECTURE}.tar.gz && \
+ rm node-${NODE_VERSION}-${ARCHICTECTURE}.tar.gz && \
+ mv node-${NODE_VERSION}-${ARCHICTECTURE} /opt/nodejs && \
+ ln -s /opt/nodejs/bin/node /usr/bin/node && \
+ ln -s /opt/nodejs/bin/npm /usr/bin/npm
+
+# Install Node dependencies
+RUN npm install npm@${NPM_VERSION} -g && \
+ npm install -g node-gyp && \
+ npm install -g fibers
+
+# Install meteor
+RUN curl https://install.meteor.com -o ./install_meteor.sh && \
+ sed -i "s|RELEASE=.*|RELEASE=${METEOR_RELEASE}\"\"|g" ./install_meteor.sh && \
+ echo "Starting meteor ${METEOR_RELEASE} installation... \n" && \
+ sh ./install_meteor.sh
+
+# Build app
+RUN cd ./app && \
+ meteor npm install --save xss && \
+ echo "Starting meteor build of the app... \n" && \
+ meteor build --directory /opt/app_build && \
+ cd /opt/app_build/bundle/programs/server/ && \
+ npm install && \
+ mv /opt/app_build/bundle /build && \
+ cd /build
+
+# Cleanup
+RUN \
+ apt-get remove --purge -y ${BUILD_DEPS} && \
+ rm -R /var/lib/apt/lists/* /app /opt/app_build ~/.meteor && \
+ rm /install_meteor.sh
+
+ENV PORT=80
+
+CMD ["node", "/build/main.js"]