Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boot2docker (windows vm) has issues when trying to run #5

Closed
paul42 opened this issue Sep 5, 2014 · 13 comments
Closed

boot2docker (windows vm) has issues when trying to run #5

paul42 opened this issue Sep 5, 2014 · 13 comments

Comments

@paul42
Copy link

paul42 commented Sep 5, 2014

I'm guessing because boot2docker is incredibly lightweight it doesn't have all the volumes?

docker@boot2docker:$ docker run -d -v /etc/localtime:/etc/localtime:ro -p 80:80 -p 8125:8125/udp -p 8126:8126 --name kamon-grafana-dashboard kamon/grafana_graphite
a4d3e7677c8337f3b56f2c1970e7745adcbcc4334445a976d45c64b00aa7160e
2014/09/05 18:22:31 Error response from daemon: Cannot start container a4d3e7677c8337f3b56f2c1970e7745adcbcc4334445a976d45c64b00aa7160e: setup mount namespace bind mounts mounting /etc/localtime into /mnt/sda1/var/lib/docker/aufs/mnt/a4d3e7677c8337f3b56f2c1970e7745adcbcc4334445a976d45c64b00aa7160e/etc/localtime not a directory
docker@boot2docker:
$

when I delete the -v flag and the volumes I can run. I'm going to skim the docs and see what that does and find out how to remedy on boot2docker (sorry, I'm linux weak)

@ivantopo
Copy link
Contributor

ivantopo commented Sep 5, 2014

@paul42 you are correct in that.. we merged some upgrades this morning that make the timezone configuration unnecessary, I'll let you known when the updated image hits the registry!

@paul42
Copy link
Author

paul42 commented Sep 5, 2014

thanks! I love the package you guys put together! I still need to find out/research what exactly the /etc/localtime:ro means, I am assuming it's a way to track timezone / time configs? does the :ro flag in docker mean read only?

@ivantopo
Copy link
Contributor

ivantopo commented Sep 5, 2014

mounting /etc/localtime is just about making sure that the docker container has the same timezone that the docker host has, to make sure that everything is displayed in local time on the grafana dashboard.. this is no longer necessary in the latest grafana release (in fact, it wasn't necessary before, we just found it convenient)... and yes, the :ro is part is for making it read-only.

@thebitmonk
Copy link

Any updates on this bug ? Unable to run the current codebase on OSX. Keep hitting this error :
Error response from daemon: Cannot start container 2f098ab6512677b1f85779f9836948df37ca34fbc516c7d15025978d9d0c816b: setup mount namespace bind mounts mounting /etc/localtime into /mnt/sda1/var/lib/docker/aufs/mnt/2f098ab6512677b1f85779f9836948df37ca34fbc516c7d15025978d9d0c816b/etc/local

@ivantopo
Copy link
Contributor

@thebitmonk please take a look at the start script, we no longer need to mount /etc/localtime, please run your container by using:

docker run -d -p 80:80 -p 8125:8125/udp -p 8126:8126 --name kamon-grafana-dashboard kamon/grafana_graphite

let us know if you have any issues!

@thebitmonk
Copy link

@ivantopo Thanks. I was able to get it up and running.

@ivantopo
Copy link
Contributor

ivantopo commented Oct 4, 2014

@thebitmonk I'm glad you got it working, I'll proceed to close this issue.. feel free to ask anything you might need in our mailing list, regards!

@quxiaojing
Copy link

@ivantopo if let timezone not set for the container, timestamp in the log file is not easy to read

@ivantopo
Copy link
Contributor

ivantopo commented Mar 5, 2015

hello @quxiaojing, can you please share what exactly do you mean by not easy to read?

@quxiaojing
Copy link

@ivantopo for example,my timezone is Asia/Shanghai,then supervisord.log show some line like

2015-03-05 11:47:46,688 INFO supervisord started with pid 1

when my expectation is

2015-03-05 19:47:46,688 INFO supervisord started with pid 1

timestamp in the log file is the UTC time, not my localtime

@ivantopo
Copy link
Contributor

Now I see what you mean. As far as I could investigate there is no other "official" way to set the container's timezone other than mounting /etc/localtime but as witnessed here, it doesn't work in all platforms.

Our initial motivation to suggest mounting /etc/localtime was that it wasn't obvious how to configure Graphite/Grafana to properly show the correct times both while displaying relative (last X time) and absolute (from x to y) metric queries. After our initial efforts Grafana got a lot smarter in this matter and now it simply works with Graphite on UTC and Grafana detecting the user's timezone, that's why after the upgrade we didn't recommend mounting /etc/localtime anymore.

Although we wont recommend it anymore, you can still mount /etc/localtime if you want to! Fortunately that's a deployment decision that you can make just by adding one more option in the command line :).

@quxiaojing
Copy link

@ivantopo Thanks for reply , I found the reason why we can mount /etc/localtime, it's because the host which run the docker damon don't have the file /etc/localtime, especially on the boot2docker-vm. so i need to customize my boot2docker-vm to resolve this problem.

@ivantopo
Copy link
Contributor

@quxiaojing please share if you find any suitable solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants