Skip to content

Commit 4772623

Browse files
authored
Release 2.3.0 (#183)
* added an iptables accept * added a config to ignore a specific gosec warning
1 parent 565d763 commit 4772623

4 files changed

Lines changed: 12 additions & 59 deletions

File tree

cmd/main.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ func main() {
5151
app.Commands = []cli.Command{}
5252
app.Commands = append(app.Commands, (&commands.Start{}).Commands()...)
5353
app.Commands = append(app.Commands, (&commands.Stop{}).Commands()...)
54-
app.Commands = append(app.Commands, (&commands.Restart{}).Commands()...)
5554
app.Commands = append(app.Commands, (&commands.Upgrade{}).Commands()...)
5655
app.Commands = append(app.Commands, (&commands.Status{}).Commands()...)
5756
app.Commands = append(app.Commands, (&commands.Config{}).Commands()...)

commands/restart.go

Lines changed: 0 additions & 53 deletions
This file was deleted.

commands/start.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ func (cmd *Start) Run(c *cli.Context) error {
9999
cmd.machine.SetEnv()
100100
cmd.out.Info("Docker Machine (%s) Created", cmd.machine.Name)
101101

102-
dns := DNS{cmd.BaseCommand}
103-
dns.StartDNS(cmd.machine, c.String("nameservers")) // nolint: gosec
104-
105102
// NFS mounts are Mac-only.
106103
if util.IsMac() {
107104
cmd.out.Spin("Enabling NFS file sharing...")
@@ -138,8 +135,15 @@ func (cmd *Start) Run(c *cli.Context) error {
138135
}
139136
cmd.out.Info("/data filesystem is ready")
140137

141-
// Route configuration needs to be finalized after NFS-triggered reboots.
138+
// When the Docker daemon runs inside boot2docker, it disables packet forwarding to containers
139+
// we need to turn this back on.
140+
// Reference: https://github.com/boot2docker/boot2docker/issues/1364
141+
util.Command("docker-machine", "ssh", cmd.machine.Name, "sudo iptables -P FORWARD ACCEPT").Run()
142+
143+
// DNS & Route configuration needs to be finalized after NFS-triggered reboots.
142144
// This rebooting may change key details such as IP Address of the Dev machine.
145+
dns := DNS{cmd.BaseCommand}
146+
dns.StartDNS(cmd.machine, c.String("nameservers")) // nolint: gosec
143147
dns.ConfigureRoutes(cmd.machine)
144148

145149
cmd.out.Verbose("Use docker-machine to interact with your virtual machine.")

gometalinter.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"Disable": ["errcheck"]
2+
"Disable": ["errcheck"],
3+
"Linters": {
4+
"gosec": { "Command": "gosec -exclude=G104" }
5+
}
36
}

0 commit comments

Comments
 (0)