質問編集履歴

2

追記の削除

2020/05/06 09:35

投稿

Sukabo
Sukabo

スコア31

test CHANGED
File without changes
test CHANGED
@@ -27,159 +27,3 @@
27
27
  その後、PCを再起動してやってみましたが状況は変わりませんでした。どうすればよいでしょうか。
28
28
 
29
29
  `vagrant version`を実行しても同じメッセージが出るだけなのでバージョンも分かりません。
30
-
31
-
32
-
33
- VagrantFile
34
-
35
- ```
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 = "ubuntu/bionic64"
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
-  config.vm.network "forwarded_port", guest: 8000, host: 8000
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
- config.vm.synced_folder "./workspace_linux", "/home/vagrant/workspace_linux"
130
-
131
- config.vm.provider :virtualbox do |vb|
132
-
133
- vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//home/vagrant/workspace","1"]
134
-
135
- end
136
-
137
- # Provider-specific configuration so you can fine-tune various
138
-
139
- # backing providers for Vagrant. These expose provider-specific options.
140
-
141
- # Example for VirtualBox:
142
-
143
- #
144
-
145
- config.vm.provider "virtualbox" do |vb|
146
-
147
- # # Display the VirtualBox GUI when booting the machine
148
-
149
- # vb.gui = true
150
-
151
- #
152
-
153
- # # Customize the amount of memory on the VM:
154
-
155
- vb.memory = "1024"
156
-
157
- end
158
-
159
- #
160
-
161
- # View the documentation for the provider you are using for more
162
-
163
- # information on available options.
164
-
165
-
166
-
167
- # Enable provisioning with a shell script. Additional provisioners such as
168
-
169
- # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
170
-
171
- # documentation for more information about their specific syntax and use.
172
-
173
- # config.vm.provision "shell", inline: <<-SHELL
174
-
175
- # apt-get update
176
-
177
- # apt-get install -y apache2
178
-
179
- # SHELL
180
-
181
- end
182
-
183
-
184
-
185
- ```

1

Vagrantfileの追記

2020/05/06 09:34

投稿

Sukabo
Sukabo

スコア31

test CHANGED
File without changes
test CHANGED
@@ -27,3 +27,159 @@
27
27
  その後、PCを再起動してやってみましたが状況は変わりませんでした。どうすればよいでしょうか。
28
28
 
29
29
  `vagrant version`を実行しても同じメッセージが出るだけなのでバージョンも分かりません。
30
+
31
+
32
+
33
+ VagrantFile
34
+
35
+ ```
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 = "ubuntu/bionic64"
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
+  config.vm.network "forwarded_port", guest: 8000, host: 8000
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
+ config.vm.synced_folder "./workspace_linux", "/home/vagrant/workspace_linux"
130
+
131
+ config.vm.provider :virtualbox do |vb|
132
+
133
+ vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate//home/vagrant/workspace","1"]
134
+
135
+ end
136
+
137
+ # Provider-specific configuration so you can fine-tune various
138
+
139
+ # backing providers for Vagrant. These expose provider-specific options.
140
+
141
+ # Example for VirtualBox:
142
+
143
+ #
144
+
145
+ config.vm.provider "virtualbox" do |vb|
146
+
147
+ # # Display the VirtualBox GUI when booting the machine
148
+
149
+ # vb.gui = true
150
+
151
+ #
152
+
153
+ # # Customize the amount of memory on the VM:
154
+
155
+ vb.memory = "1024"
156
+
157
+ end
158
+
159
+ #
160
+
161
+ # View the documentation for the provider you are using for more
162
+
163
+ # information on available options.
164
+
165
+
166
+
167
+ # Enable provisioning with a shell script. Additional provisioners such as
168
+
169
+ # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
170
+
171
+ # documentation for more information about their specific syntax and use.
172
+
173
+ # config.vm.provision "shell", inline: <<-SHELL
174
+
175
+ # apt-get update
176
+
177
+ # apt-get install -y apache2
178
+
179
+ # SHELL
180
+
181
+ end
182
+
183
+
184
+
185
+ ```