-
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.
Beginning to deprecate the semver approach of applying multiple version tags (i.e. 1.0.5, 1.0, and 1) to a release - Meteor does not actually follow semver.
- Loading branch information
1 parent
327b9f9
commit 04ddfa8
Showing
6 changed files
with
108 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,12 @@ | ||
FROM danieldent/meteor:1.1 | ||
MAINTAINER Daniel Dent (https://www.danieldent.com/) | ||
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,26 @@ | ||
FROM node:0.10 | ||
MAINTAINER Daniel Dent (https://www.danieldent.com/) | ||
|
||
ENV METEOR_VERSION 1.1 | ||
ENV METEOR_INSTALLER_SHA256 4020ef4d3bc257cd570b5b2d49e3490699c52d0fd98453e29b7addfbdfba9c80 | ||
ENV METEOR_LINUX_X86_32_SHA256 a4eb24501ceeb73739125f45cb72fda57f2c2f3462a7d2bbf6424ab231e89be7 | ||
ENV METEOR_LINUX_X86_64_SHA256 93a95576ae1b41bc7d9808dd558e7e397d9ee9cab3b96e35566fc3c291062a84 | ||
|
||
# 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 | ||
|
||
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