-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Meteor 1.0.3.1 support. ONBUILD tags added.
* Resolves #1 * Deprecates demeteorizer support. * Updated README * Meteor releases <= 1.0.2.1 now have their artifacts frozen to releases on this GitHub repo.
- Loading branch information
1 parent
6c52ebd
commit ca5958d
Showing
14 changed files
with
169 additions
and
30 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
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
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
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,11 @@ | ||
FROM danieldent/meteor:1.0.3.1 | ||
ONBUILD COPY . /opt/src | ||
ONBUILD WORKDIR /opt/src | ||
ONBUILD RUN meteor build .. --directory \ | ||
&& cd ../bundle/programs/server \ | ||
&& npm install \ | ||
&& rm -rf /opt/src | ||
ONBUILD WORKDIR /opt/bundle | ||
ONBUILD USER nobody | ||
ONBUILD ENV PORT 3000 | ||
CMD ["/usr/local/bin/node", "main.js"] |
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,31 @@ | ||
FROM node:0.10 | ||
MAINTAINER Daniel Dent (https://www.danieldent.com/) | ||
|
||
ENV METEOR_VERSION 1.0.3.1 | ||
ENV METEOR_INSTALLER_SHA256 4020ef4d3bc257cd570b5b2d49e3490699c52d0fd98453e29b7addfbdfba9c80 | ||
ENV METEOR_LINUX_X86_32_SHA256 d6260e20aa723109d1ed0be4bbc260cf33322110e1075e230587d29e8c327be2 | ||
ENV METEOR_LINUX_X86_64_SHA256 d732cb54215bde3f08002b49364d45f827cf25db291608f8a625d0f7e70ca97e | ||
|
||
# 1. Download & verify the meteor installer. | ||
# 2. Patch it to validate the meteor tarball's checksums. | ||
# 3. Install meteor | ||
|
||
COPY meteor-installer.patch /tmp/meteor/meteor-installer.patch | ||
COPY vboxsf-shim.sh /usr/local/bin/vboxsf-shim | ||
RUN curl -SL https://install.meteor.com/ -o /tmp/meteor/inst \ | ||
&& sed -e "s/^RELEASE=.*/RELEASE=\"\$METEOR_VERSION\"/" /tmp/meteor/inst > /tmp/meteor/inst-canonical \ | ||
&& echo $METEOR_INSTALLER_SHA256 /tmp/meteor/inst-canonical | sha256sum -c \ | ||
&& patch /tmp/meteor/inst /tmp/meteor/meteor-installer.patch \ | ||
&& chmod +x /tmp/meteor/inst \ | ||
&& /tmp/meteor/inst \ | ||
&& rm -rf /tmp/meteor | ||
|
||
# 4. Install demeteorizer (using my fork of demeteorizer until Dockerfile support is merged upstream) | ||
|
||
RUN npm install -g DanielDent/demeteorizer#v2.1.0 \ | ||
&& npm cache clear | ||
|
||
VOLUME /app | ||
WORKDIR /app | ||
EXPOSE 3000 | ||
CMD [ "meteor" ] |
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,55 @@ | ||
--- meteor-installer 2014-12-10 15:22:12.232084632 -0800 | ||
+++ meteor-installer.new 2014-12-10 15:27:20.532084632 -0800 | ||
@@ -31,6 +31,11 @@ | ||
## know what shell the user has. Debian uses 'dash' for 'sh', for | ||
## example. | ||
|
||
+# If METEOR_VERSION is set, we want to install that instead. | ||
+if [ "${METEOR_VERSION}" != "latest" ] ; then | ||
+ RELEASE="${METEOR_VERSION:-$RELEASE}" | ||
+fi | ||
+ | ||
PREFIX="/usr/local" | ||
|
||
set -e | ||
@@ -41,7 +46,7 @@ | ||
|
||
|
||
UNAME=$(uname) | ||
-if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then | ||
+if [ "$UNAME" != "Linux" ] ; then | ||
echo "Sorry, this OS is not supported yet." | ||
exit 1 | ||
fi | ||
@@ -73,8 +78,10 @@ | ||
LINUX_ARCH=$(uname -m) | ||
if [ "${LINUX_ARCH}" = "i686" ] ; then | ||
PLATFORM="os.linux.x86_32" | ||
+ TARBALL_CHECKSUM="${METEOR_LINUX_X86_32_SHA256:-}" | ||
elif [ "${LINUX_ARCH}" = "x86_64" ] ; then | ||
PLATFORM="os.linux.x86_64" | ||
+ TARBALL_CHECKSUM="${METEOR_LINUX_X86_64_SHA256:-}" | ||
else | ||
echo "Unusable architecture: ${LINUX_ARCH}" | ||
echo "Meteor only supports i686 and x86_64 for now." | ||
@@ -118,7 +125,19 @@ | ||
rm -rf "$INSTALL_TMPDIR" | ||
mkdir "$INSTALL_TMPDIR" | ||
echo "Downloading Meteor distribution" | ||
-curl --progress-bar --fail "$TARBALL_URL" | tar -xzf - -C "$INSTALL_TMPDIR" -o | ||
+INSTALLER_TARBALL=$(mktemp) | ||
+eval curl -L --progress-bar --fail "${TARBALL_URL_OVERRIDE:-$TARBALL_URL}" > $INSTALLER_TARBALL | ||
+# If we got passed an explicit version, then we also expect | ||
+# to be passed that version's checksums. | ||
+if [ "${METEOR_VERSION:-latest}" != "latest" ]; then | ||
+ if ! echo "$TARBALL_CHECKSUM $INSTALLER_TARBALL" | sha256sum -c; then | ||
+ rm -rf "${INSTALLER_TARBALL}" | ||
+ echo "Installer tarball checksum failed." | ||
+ exit 1 | ||
+ fi | ||
+fi | ||
+tar -xzf $INSTALLER_TARBALL -C "$INSTALL_TMPDIR" -o | ||
+rm -rf "${INSTALLER_TARBALL}" | ||
# bomb out if it didn't work, eg no net | ||
test -x "${INSTALL_TMPDIR}/.meteor/meteor" | ||
mv "${INSTALL_TMPDIR}/.meteor" "$HOME" |
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,10 @@ | ||
#!/bin/sh | ||
|
||
# If there's a .meteor/local directory we can mount on top of, we create a directory in /tmp for a bind mount. | ||
# This allows MongoDB to acquire the lock it needs and meteor's development server to be happy with filesystem sync. | ||
|
||
if ! [ -d /tmp/meteor-local ]; then | ||
mkdir /tmp/meteor-local && mount -o bind /tmp/meteor-local .meteor/local || rmdir /tmp/meteor-local | ||
fi | ||
|
||
exec "$@" |
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
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,11 @@ | ||
FROM danieldent/meteor:latest | ||
ONBUILD COPY . /opt/src | ||
ONBUILD WORKDIR /opt/src | ||
ONBUILD RUN meteor build .. --directory \ | ||
&& cd ../bundle/programs/server \ | ||
&& npm install \ | ||
&& rm -rf /opt/src | ||
ONBUILD WORKDIR /opt/bundle | ||
ONBUILD USER nobody | ||
ONBUILD ENV PORT 3000 | ||
CMD ["/usr/local/bin/node", "main.js"] |