How to deploy app in this meteor docker image? -
i tring use https://github.com/cycoresystems/docker-meteor run meteor app.
i built docker image dockerfile in github repository.
one issue have not sure commands run docker image.
there not many instructions how use image.
if run docker run -i -t ulexus/meteor /bin/bash
, there error complaining '/var/www/main.js' not found.
but how can copy meteor app source container without running container?
maybe need use example in instruction: docker run --rm -e root_url=http://testsite.com -e repo=https://github.com/yourname/testsite -e branch=testing -e mongo_url=mongodb://mymongoserver.com:27017 ulexus/meteor
but app repo private 1 rather public in github. not sure how specify username/password in command.
==========
the dockerfile used create image this:
# docker-version 1.2.0 # meteor-version 1.0.0 stackbrew/ubuntu:trusty run apt-get update ### latest node run apt-get install -y software-properties-common run add-apt-repository -y ppa:chris-lea/node.js run apt-get update run apt-get install -y build-essential nodejs ### ### standard ubuntu node #run apt-get install -y build-essential nodejs npm #run ln -s /usr/bin/nodejs /usr/bin/node ### # install git , curl run apt-get install -y git curl # make sure have directory application run mkdir -p /var/www run chown -r www-data:www-data /var/www # install fibers -- doesn't seem good, reason run npm install -g fibers # install meteor run curl https://install.meteor.com/ |sh # install entrypoint add entrypoint.sh /usr/bin/entrypoint.sh run chmod +x /usr/bin/entrypoint.sh # add known_hosts file add known_hosts /root/.ssh/known_hosts expose 80 entrypoint ["/usr/bin/entrypoint.sh"] cmd []
===========
error messages after run docker run -i -t ulexus/meteor /bin/bash
:
unable locate server directory; hold on: we're fail module.js:340 throw err; ^ error: cannot find module '/var/www/main.js' @ function.module._resolvefilename (module.js:338:15) @ function.module._load (module.js:280:25) @ function.module.runmain (module.js:497:10) @ startup (node.js:119:16) @ node.js:906:3
i'm not sure mean command docker run -i -t ulexus/meteor /bin/bash
because -i
, -t
, /bin/bash
@ end, starts image , runs interactive bash session. how create main.js
error? dockerfile like? use following command run test-server starts simple sshd
process: docker run -p 22:22 --rm=true --name sshd-server sshd
. here image named (in case ulexus/meteor) sshd
started , resulting container's name sshd-server
. it's important note /bin/bash
command missing on end, -i
, -t
, have cmd
entry in dockerfile. here's mine cmd ["/usr/sbin/sshd", "-d"]
, here's copy of dockerfile itself:
from debian:wheezy run apt-get update run apt-get upgrade run apt-get -y install openssh-server run echo 'root:root' | chpasswd run mkdir /var/run/sshd cmd ["/usr/sbin/sshd", "-d"] expose 22
your cmd entry should starts meteor.
and docker
command this:
docker run -p hostport:containerport --rm ulexus/meteor
notice again -i
, -t
, , /bin/bash
missing. hostport:containerport
can open network (ssh
) connection container.
hope helps!
Comments
Post a Comment