Skip to content

Commit

Permalink
Release 2.3.0 (#183)
Browse files Browse the repository at this point in the history
* added an iptables accept
* added a config to ignore a specific gosec warning
  • Loading branch information
febbraro authored Dec 12, 2018
1 parent 565d763 commit 4772623
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 59 deletions.
1 change: 0 additions & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ func main() {
app.Commands = []cli.Command{}
app.Commands = append(app.Commands, (&commands.Start{}).Commands()...)
app.Commands = append(app.Commands, (&commands.Stop{}).Commands()...)
app.Commands = append(app.Commands, (&commands.Restart{}).Commands()...)
app.Commands = append(app.Commands, (&commands.Upgrade{}).Commands()...)
app.Commands = append(app.Commands, (&commands.Status{}).Commands()...)
app.Commands = append(app.Commands, (&commands.Config{}).Commands()...)
Expand Down
53 changes: 0 additions & 53 deletions commands/restart.go

This file was deleted.

12 changes: 8 additions & 4 deletions commands/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ func (cmd *Start) Run(c *cli.Context) error {
cmd.machine.SetEnv()
cmd.out.Info("Docker Machine (%s) Created", cmd.machine.Name)

dns := DNS{cmd.BaseCommand}
dns.StartDNS(cmd.machine, c.String("nameservers")) // nolint: gosec

// NFS mounts are Mac-only.
if util.IsMac() {
cmd.out.Spin("Enabling NFS file sharing...")
Expand Down Expand Up @@ -138,8 +135,15 @@ func (cmd *Start) Run(c *cli.Context) error {
}
cmd.out.Info("/data filesystem is ready")

// Route configuration needs to be finalized after NFS-triggered reboots.
// When the Docker daemon runs inside boot2docker, it disables packet forwarding to containers
// we need to turn this back on.
// Reference: https://github.com/boot2docker/boot2docker/issues/1364
util.Command("docker-machine", "ssh", cmd.machine.Name, "sudo iptables -P FORWARD ACCEPT").Run()

// DNS & Route configuration needs to be finalized after NFS-triggered reboots.
// This rebooting may change key details such as IP Address of the Dev machine.
dns := DNS{cmd.BaseCommand}
dns.StartDNS(cmd.machine, c.String("nameservers")) // nolint: gosec
dns.ConfigureRoutes(cmd.machine)

cmd.out.Verbose("Use docker-machine to interact with your virtual machine.")
Expand Down
5 changes: 4 additions & 1 deletion gometalinter.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"Disable": ["errcheck"]
"Disable": ["errcheck"],
"Linters": {
"gosec": { "Command": "gosec -exclude=G104" }
}
}

0 comments on commit 4772623

Please sign in to comment.