Help us understand the problem. What is going on with this article?

docker + vagrant つまった

https://qiita.com/yuki_ycino/items/cb21cf91a39ddd61f484

結論

x6高速化した(およそ)

root:/app# time be rails c
exit
Loading development environment (Rails 5.2.1)
[1] pry(main)> exit

real    0m34.178s
user    0m4.220s
sys     0m5.320s
root@265ac4de7a75:/app#
root:/app# time be rails c
exit
Loading development environment (Rails 5.2.1)
[1] pry(main)> exit

real    0m5.528s
user    0m3.944s
sys     0m1.032s
root@55ab770832b2:/app#

測定方法がわからなかったので、rails consoleとexitを間髪入れずに入力して、timeで測定しました。

成果物

https://github.com/kajirikajiri/docker-vagrant

以下つまったところ

vagrant sshで接続して、curlできない

エラー curl: (6) Could not resolve host: get.docker.com

vagrant ssh
sudo dpkg-reconfigure resolvconf
sudo vi /etc/resolv.conf
# 追加2行
nameserver 8.8.8.8
nameserver 8.8.4.4

dockerコマンドでエラーが発生

エラー If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

sudo docker でok
上記のようなエラーが発生するため、分かりづらい。(premission deniedとか言ってほしい)

https://qiita.com/rysk92/items/e10f898abdc701e09e38
上記記事のようにしてもできるはず

ファイル監視数の上限が足りない

ok
vagrant ssh
echo "fs.inotify.max_user_watches = 524288" >> /etc/sysctl.conf && sysctl -p
ng
docker exec -it container_name bash
echo "fs.inotify.max_user_watches = 524288" >> /etc/sysctl.conf && sysctl -p

https://qiita.com/enta0701/items/bc9f8f8c780222979784
vagrant内でファイル監視数上限を上げることでok
最初、dockerコンテナ内で監視上限をあげようとして、失敗した


pcが急にシャットダウンする

pcのメモリ16GBに対して
vagrant 8GB
docker 8GB
を与えたら落ちました。たぶんそれで落ちたと思うので、メモリは確認しましょう


ベイグラントって読むんですね
https://ja.wikipedia.org/wiki/Vagrant_(%E3%82%BD%E3%83%95%E3%83%88%E3%82%A6%E3%82%A7%E3%82%A2)

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした