How to launch after built?
scheung38 opened this issue · 7 comments
---> Running in b8d6992bdb95
---> 4657489eb80b
Removing intermediate container b8d6992bdb95
Successfully built 4657489eb80b
I dont see the image anywhere in the Docker Kitematic GUI after refresh?
@scheung38 I don't use the Kitematic UI, but you can run it using (customise the environment variables):
docker run --rm \
-e ROOT_URL=http://yourapp.com \
-e MONGO_URL=mongodb://url \
-e MONGO_OPLOG_URL=mongodb://oplog_url \
-p 8080:80 \
yourname/app
Thanks Chris, but if ROOT_URL, MONGO_URL MONGO_OPLOG are not previously defined as part of the build, I can attach to it later?
See here: https://github.com/chriswessels/meteor-tupperware#running-your-app-image
You can embed the environment variable definitions into your Dockerfile (and thus image) with the ENV
directive.
Could you give example of where
ROOT_URL, MONGO_URL MONGO_OPLOG as well as yourname/app are defined?
ENV MONGO_URL="mongodb://localhost:27017/future_tasks" ROOT_URL="http://???"
MONGO_OPLOG_URL="mongodb://oplog_url"
But not sure if these are correct.
yourname/app
is the name of the image you built with docker build -t yourname/app .
. Please change it appropriately.
ROOT_URL
, MONGO_URL
and MONGO_OPLOG
are all environment variables required by the Meteor app to run.
You can either provide them at run time, example:
docker run --rm \
-e ROOT_URL=http://yourapp.com \
-e MONGO_URL=mongodb://url \
-e MONGO_OPLOG_URL=mongodb://oplog_url \
-p 8080:80 \
yourname/app
Or, you can include them in the Docker image by customising your Dockerfile to specify them, example:
FROM quay.io/chriswessels/meteor-tupperware
ENV MONGO_URL="mongodb://url" MONGO_OPLOG_URL="mongodb://oplog_url" ROOT_URL="http://yourapp.com"
MONGO_OPLOG_URL
should be set if your Mongo host provides oplog access, and is typically set in this format (if you have a replica set):
MONGO_OPLOG_URL=mongodb://oplogger:PasswordForOplogger@mongo-server-1.example.com,mongo-server-2.example.com,mongo-server-3.example.com/local?authSource=admin&replicaSet=replicaSetName
Hi Chris
Could you give actual example ? It is just not clear enough for me where to obtain these
MONGO_OPLOG_URL=mongodb://oplogger:PasswordForOplogger@mongo-server-1.example.com,mongo-server-2.example.com,mongo-server-3.example.com/local?authSource=admin&replicaSet=replicaSetName
http://yourapp.com assumes it is using external hosting platform, but it is just internal for me so I wont have name but just IP address
docker build -t sebastianc/spark2acs .
unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /Users/seb/Dockerfile: no such file or directory
EDIT:
$ meteor mongo --url
mongodb://127.0.0.1:3001/meteor
So
-e MONGO_URL=mongodb://url
becomes
-e MONGO_URL=mongodb://127.0.0.1:3001/meteor
correct?
So
docker run --rm
-e ROOT_URL=http://yourapp.com
-e MONGO_URL=mongodb://url
-e MONGO_OPLOG_URL=mongodb://oplog_url
-p 8080:80
yourname/app
becomes
docker run --rm \
-e ROOT_URL=http://yourapp.com \ <-?? Don't have hostname
-e MONGO_URL=mongodb://127.0.0.1:3001/meteor
-e MONGO_OPLOG_URL=mongodb://oplog_url \ <-- ??
-p 8080:80
yourname/app <--??
Don't have any idea how to resolve the others
If you could show actual example with real values that would be highly appreciated, cheers
Will respond in your other issue.