質問編集履歴

2

Vagrantファイルの中身の全容を追加しました

2020/06/19 01:54

投稿

shirout
shirout

スコア36

test CHANGED
File without changes
test CHANGED
@@ -30,6 +30,154 @@
30
30
 
31
31
  ```
32
32
 
33
+
34
+
35
+ ```Vagrantファイルの中身の全容です
36
+
37
+ # -*- mode: ruby -*-
38
+
39
+ # vi: set ft=ruby :
40
+
41
+
42
+
43
+ # All Vagrant configuration is done below. The "2" in Vagrant.configure
44
+
45
+ # configures the configuration version (we support older styles for
46
+
47
+ # backwards compatibility). Please don't change it unless you know what
48
+
49
+ # you're doing.
50
+
51
+ Vagrant.configure("2") do |config|
52
+
53
+ # The most common configuration options are documented and commented below.
54
+
55
+ # For a complete reference, please see the online documentation at
56
+
57
+ # https://docs.vagrantup.com.
58
+
59
+
60
+
61
+ # Every Vagrant development environment requires a box. You can search for
62
+
63
+ # boxes at https://vagrantcloud.com/search.
64
+
65
+ config.vm.box = "fabric-fundamentals"
66
+
67
+
68
+
69
+ # Disable automatic box update checking. If you disable this, then
70
+
71
+ # boxes will only be checked for updates when the user runs
72
+
73
+ # `vagrant box outdated`. This is not recommended.
74
+
75
+ # config.vm.box_check_update = false
76
+
77
+
78
+
79
+ # Create a forwarded port mapping which allows access to a specific port
80
+
81
+ # within the machine from a port on the host machine. In the example below,
82
+
83
+ # accessing "localhost:8080" will access port 80 on the guest machine.
84
+
85
+ # NOTE: This will enable public access to the opened port
86
+
87
+ # config.vm.network "forwarded_port", guest: 80, host: 8080
88
+
89
+
90
+
91
+ # Create a forwarded port mapping which allows access to a specific port
92
+
93
+ # within the machine from a port on the host machine and only allow access
94
+
95
+ # via 127.0.0.1 to disable public access
96
+
97
+ # config.vm.network "forwarded_port", guest: 80, host: 8080, host_ip: "127.0.0.1"
98
+
99
+
100
+
101
+ # Create a private network, which allows host-only access to the machine
102
+
103
+ # using a specific IP.
104
+
105
+ # config.vm.network "private_network", ip: "192.168.33.10"
106
+
107
+
108
+
109
+ # Create a public network, which generally matched to bridged network.
110
+
111
+ # Bridged networks make the machine appear as another physical device on
112
+
113
+ # your network.
114
+
115
+ # config.vm.network "public_network"
116
+
117
+
118
+
119
+ # Share an additional folder to the guest VM. The first argument is
120
+
121
+ # the path on the host to the actual folder. The second argument is
122
+
123
+ # the path on the guest to mount the folder. And the optional third
124
+
125
+ # argument is a set of non-required options.
126
+
127
+ # config.vm.synced_folder "../data", "/vagrant_data"
128
+
129
+
130
+
131
+ # Provider-specific configuration so you can fine-tune various
132
+
133
+ # backing providers for Vagrant. These expose provider-specific options.
134
+
135
+ # Example for VirtualBox:
136
+
137
+ #
138
+
139
+ # config.vm.provider "virtualbox" do |vb|
140
+
141
+ # # Display the VirtualBox GUI when booting the machine
142
+
143
+ # vb.gui = true
144
+
145
+ #
146
+
147
+ # # Customize the amount of memory on the VM:
148
+
149
+ # vb.memory = "1024"
150
+
151
+ # end
152
+
153
+ #
154
+
155
+ # View the documentation for the provider you are using for more
156
+
157
+ # information on available options.
158
+
159
+
160
+
161
+ # Enable provisioning with a shell script. Additional provisioners such as
162
+
163
+ # Ansible, Chef, Docker, Puppet and Salt are also available. Please see the
164
+
165
+ # documentation for more information about their specific syntax and use.
166
+
167
+ # config.vm.provision "shell", inline: <<-SHELL
168
+
169
+ # apt-get update
170
+
171
+ # apt-get install -y apache2
172
+
173
+ # SHELL
174
+
175
+ end
176
+
177
+ vagrant box add --name fabric-fundamentals fabric-fundamentals.box
178
+
179
+ ```
180
+
33
181
  VagrantのBOXの追加ができません。
34
182
 
35
183
  このようなエラーが出るのですが何が原因か分かる方いたらお願いします。

1

vagrant fileの内容追加

2020/06/19 01:54

投稿

shirout
shirout

スコア36

test CHANGED
File without changes
test CHANGED
@@ -24,7 +24,11 @@
24
24
 
25
25
  ```
26
26
 
27
+ ```以下vagrant fileの内容になります!
27
28
 
29
+ vagrant box add --name fabric-fundamentals fabric-fundamentals.box3.Vagrant環境を起動するディレクトリへ移動します(先ほどダウンロードしたVagrantイメージ内に作成されています)。Vagrant環境は、必要なディレクトリ構造がすべて定義された仮想マシンであり、Vagrantをどこからでも実行できます。4.以下のコマンドを実行して、Vagrant環境を初期化します。vagrant init fabric-fundamentals現在のディレクトリに新規のVagrantfileが作成されます。このファイルに、プロジェクトが使用する仮想マシンの種類、また仮想マシンの構成方法とプロビジョニング方法が記述されています。このファイルは必要に応じて修正することができます。5.仮想マシン/boxを実行する準備ができましたので、以下を実行します。vagrant up6.数分後に、以下の確認メッセージが表示されます。==> default: Machine booted and ready!VMが正常に起動した合図です。vagrant upの実行中にエラーが発生した場合は、本講習に含まれるトラブルシューティングガイドを参照してください。7.これで、実行中のVagrant VMにログインするために、SSHを使用できるようになります。vagrant ssh次に、環境内にあるfabric-fundamentalsディレクトリへ移動します。cd ~/fabric-fundamentals
30
+
31
+ ```
28
32
 
29
33
  VagrantのBOXの追加ができません。
30
34