danieldent / docker-meteor Goto Github PK
View Code? Open in Web Editor NEWMeteor Dockerized for Development and Production
License: Other
Meteor Dockerized for Development and Production
License: Other
Hi,
I pulled your image and ran docker build successfully.
When I issue docker run though, including all the parameter you specified, I get this error:
Unable to find image 'meteor:latest' locally
Pulling repository docker.io/library/meteor
docker: Error: image library/meteor not found.
I am running docker 1.11 on Ubuntu 14.04. Is this a bug or is it related to some local set-up?
Thank you,
Alex
Followed instructions and have attempted to do a build, got the following output:
docker build -t myAppname .
Sending build context to Docker daemon 13.99 MB
Step 1 : FROM danieldent/meteor:onbuild
# Executing 6 build triggers...
Step 1 : COPY . /opt/src
Step 1 : WORKDIR /opt/src
---> Running in 1453ed5c1223
Step 1 : RUN meteor build .. --directory && cd ../bundle/programs/server && npm install && rm -rf /opt/src
---> Running in a677fdb41901
/root/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:259
throw new Error('Must throw non-empty error');
^
Error: Must throw non-empty error
at Object.Future.throw (/root/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fibers/future.js:259:10)
at Extract.<anonymous> (/tools/fs/files.js:699:42)
at Extract.emit (events.js:117:20)
at DirWriter.<anonymous> (/root/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/tar/lib/extract.js:61:8)
at DirWriter.emit (events.js:117:20)
at FileWriter.<anonymous> (/root/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fstream/lib/dir-writer.js:158:12)
at FileWriter.emit (events.js:92:17)
at WriteStream.<anonymous> (/root/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/fstream/lib/file-writer.js:50:47)
at WriteStream.emit (events.js:95:17)
at WriteStream.<anonymous> (evalmachine.<anonymous>:1669:12)
at OpenReq.Req.done (/root/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/graceful-fs/graceful-fs.js:141:5)
at OpenReq.done (/root/.meteor/packages/meteor-tool/.1.1.10.ki0ccv++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/graceful-fs/graceful-fs.js:61:22)
at Object.oncomplete (evalmachine.<anonymous>:108:15)
The command '/bin/sh -c meteor build .. --directory && cd ../bundle/programs/server && npm install && rm -rf /opt/src' returned a non-zero code: 8
As dev showed in another issue brieve signal of a desire of updating this repo I open this issue to say that first thing to do is to stop using root as user, or to use the --allow-superuser
option when launching meteor
otherwise meteor
is not gonna working (either to compile or to watch file in dev mode) giving the error message :
You are attempting to run Meteor as the 'root' superuser. If you are
developing, this is almost certainly *not* what you want to do and will likely
result in incorrect file permissions. However, if you are running this command
in a build process (CI, etc.), or you are absolutely sure you know what you are
doing, set the METEOR_ALLOW_SUPERUSER environment variable or pass
--allow-superuser to proceed.
I also want to know what is the future of this package, multiple updates on docker has been made but github hasn't been updated. As there's activity on this package I'm probably gonna use this dockerfile if your going to support this package in the future so could you please declare for devs like me your plans about this package.
hi, i know there is a prob between host and VM but how can i fix it ?
ฮป docker run --cap-add SYS_ADMIN -it --rm -p 3000:3000 -v C:\Users\sofiane\copyD\projets\docker:/app danieldent/meteor vboxsf-shim meteor docker: Error response from daemon: Invalid bind mount spec "C:\\Users\\sofiane\\copyD\\projets\\docker:/app": volumeinvalidmode: invalid mode: "/app". See 'docker run --help'.
I have Meteor v1.3.4.1 and my build fails when I have IOS and Android platforms added, because it needs a server URL to build the mobile apps.
The meteor build command offers a --server-only option.
Hi Daniel.
I'm using your docker images for my development and I really like it. I see that the last update is some time ago. Will you update to version .3 and later to 1.2?
Thanks for the great work.
Stefan
I am trying to do development with https://github.com/mcknightg/flutterbum by running Meteor from the container and getting the following error (but only when I run meteor from the container, with regular installation of Meteor it works fine):
Error: Error invoking Method 'addCustomer':
Method not found [404]
The method is defined in the email.js file, in the server sub-directory using Meteor.Methods. None of the defined Meteor.Methods is accessible from the client by Meteor.call. I modified the code and copied all Meteor.Method definitions into a .js file and put in the root folder into an "isServer" if-condition. This way all methods are accessible.
As stated before I do not have this issue when I run the app from the local Meteor server, only when I run it from the docker container. It seems to me as if the "server" sub-directory is not accessible from the container.
Can you please advise?
When I try to run an existing Meteor app with the given instructions, I get the error below:
$ docker run -it --rm -p 3000:3000 --link my_appDb:db -e "MONGO_URL=mongodb://db" -e "ROOT_URL=http://localhost:3000" -e MY_KEY -e MY_USER my_app
/opt/bundle/programs/server/node_modules/fibers/future.js:245
throw(ex);
^
Error: Module did not self-register.
at Error (native)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Module.require (module.js:365:17)
at require (module.js:384:17)
at bindings (/opt/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/node_modules/bindings/bindings.js:74:15)
at Object.<anonymous> (/opt/bundle/programs/server/npm/npm-bcrypt/node_modules/bcrypt/bcrypt.js:3:35)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
I'm on Mac OS X with the following versions running:
$ node -v
v0.12.7
$ meteor --version
Meteor 1.1.0.3
$ boot2docker version
Boot2Docker-cli version: v1.7.0
Git commit: 7d89508
$ docker version
Client version: 1.7.0
Client API version: 1.19
Go version (client): go1.4.2
Git commit (client): 0baf609
OS/Arch (client): darwin/amd64
Server version: 1.8.1
Server API version: 1.20
Go version (server): go1.4.2
Git commit (server): d12ea79
OS/Arch (server): linux/amd64
I've tried npm rebuild
, but it didn't help.
There was a related issue in an earlier version of Meteor: meteor/meteor#3666
One of the comments suggested running this command to make sure my bcrypt binary is built for Linux rather than Mac, but I'm not sure where (locally? in the Dockerfile?):
meteor build --architecture os.linux.x86_64
Is there any way to cache the npm process? I've done it in the past by copying package.json in and running npm install before the rest of the app files. Docker sees there are no changes to package.json and caches the commands.
Could it be possible to make a package.json for the base meteor app and copy that in and install first? That way caching a lot of the packages installed?
mfal noted: "Nice work! One thing: Stopping the meteor server (with CTR+C) leads to an infinite loop of server restarts. That's why I start the container in detached mode (-d and without --rm and -ti). Afterwards I use docker logs -f to see what's going on.
To shutdown or reload the container I use docker stop/restart ."
I responded: "Thanks for the feedback! I experienced the same frustration and I agree with you this is annoying. Your approach seems like a straightforward workaround. Using docker's kill command has been the workaround I've been using. I've been wanting to chat with the Docker folks about this. The signal handling doesn't feel quite right to me, I believe ctrl-c should be trapped and sent to the process, much how telnet & ssh behave. Docker's command line help indicates signal proxying is happening, but things are not behaving quite as I expect.".
My message to the docker mailing list has not yet received a response. This issue could use future follow-up.
Hey,
Thanks for the container, works great ๐
I'm not sure is it possible to solve as part of Dockerfile definition or a description needed to be added to README but I've noticed significant slow downs on startup of meteor app first time container is launched.
See example for a very small app(only 5 packages including core):
> du -d0Hm ~/.meteor/
308944 /root/.meteor/
> meteor
.....
> du -d0Hm ~/.meteor/
334412 /root/.meteor/
As soon as I stop the container it will reset back to 308944 as expected. Which means EVERY time I start a dev container for this app it will try to build up cache again which results in significant extra download.
Any ideas on how to fix it ? I've tried to mount ~/.meteor inside the container but it doesn't seem to work.
I like your implementation, seems very lean.
There is another dockerhub image that has a nice Git workflow. https://registry.hub.docker.com/u/ulexus/meteor/
Would be nice if your image had this as well, especially for production and continuous deployment.
Hi!
I get a checksum error on 1.0.5 - can you explain how the SHA is generated? As it seems to not match:
Sending build context to Docker daemon 6.656 kB
Sending build context to Docker daemon
Step 1 : FROM node:0.10
---> 38c02af29fa3
Step 2 : MAINTAINER Daniel Dent (https://www.danieldent.com/)
---> Using cache
---> 92576d399b35
Step 3 : ENV METEOR_VERSION 1.0.5
---> Using cache
---> 3e4bbf01253d
Step 4 : ENV METEOR_INSTALLER_SHA256 4020ef4d3bc257cd570b5b2d49e3490699c52d0fd98453e29b7addfbdfba9c80
---> Using cache
---> 31c745647a41
Step 5 : ENV METEOR_LINUX_X86_32_SHA256 7dedd029f41082f0b009a9cf96ab729e2252553e7d19a9f96d11207ca049f464
---> Using cache
---> 6b0ad0074eb5
Step 6 : ENV METEOR_LINUX_X86_64_SHA256 77e011f6a8099ec3dc4527b635f3197896d698877da75e5365457e6a15b8979b
---> Using cache
---> f9b88cd5c931
Step 7 : ENV TARBALL_URL_OVERRIDE https://github.com/DanielDent/docker-meteor/releases/download/v${RELEASE}/meteor-bootstrap-${PLATFORM}-${RELEASE}.tar.gz
---> Using cache
---> 93ed897e29ed
Step 8 : COPY meteor-installer.patch /tmp/meteor/meteor-installer.patch
---> 7b3b64a31a86
Removing intermediate container ec632ae47485
Step 9 : COPY vboxsf-shim.sh /usr/local/bin/vboxsf-shim
---> 14fc86463e56
Removing intermediate container 4a7bdcfabec0
Step 10 : 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
---> Running in 1996b592497c
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6674 0 6674 0 0 130 0 --:--:-- 0:00:51 --:--:-- 1767
/tmp/meteor/inst-canonical: FAILED
sha256sum: WARNING: 1 computed checksum did NOT match
INFO[0059] The command '/bin/sh -c 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' returned a non-zero code: 1
Its possible to use these Dockerfiles as base files for a new set of ONBUILD Dockerfiles that make demeteorizer unnecessary for production builds. Document this and deprecate use of demeteorizer.
Hi and thank you for such a great image - saves a lot of time.
However, as for me, it definitely missing spiderable package support - means useless in production. Fix is easy, only PhantomJS should be installed in the image.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.