Skip to content

Commit

Permalink
Merge pull request #266 from h0x0er/docker-reload
Browse files Browse the repository at this point in the history
Reload docker daemon instead of restart
  • Loading branch information
varunsh-coder authored Aug 6, 2022
2 parents 461b38a + 510aa67 commit fd86e39
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scorecard-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@e3e75cf2ffbf9364bbff86cdbdf52b23176fe492 # v1.0.1
uses: ossf/scorecard-action@3e15ea8318eee9b333819ec77a36aca8d39df13e # v1.0.1
with:
results_file: results.sarif
results_format: sarif
Expand Down
8 changes: 4 additions & 4 deletions dnsconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ func (d *DnsConfig) SetDockerDNSServer(cmd Command, configPath, tempDir string)
}

if cmd == nil {
cmd = exec.Command("/bin/sh", "-c", "sudo systemctl daemon-reload && sudo systemctl restart docker")
cmd = exec.Command("/bin/sh", "-c", "sudo systemctl daemon-reload && sudo systemctl reload docker")
}

err = cmd.Run()
if err != nil {
return fmt.Errorf(fmt.Sprintf("error re-starting docker: %v", err))
return fmt.Errorf(fmt.Sprintf("error reloading docker: %v", err))
}

return nil
Expand All @@ -186,12 +186,12 @@ func (d *DnsConfig) RevertDockerDNSServer(cmd Command, configPath string) error
}

if cmd == nil {
cmd = exec.Command("/bin/sh", "-c", "sudo systemctl daemon-reload && sudo systemctl restart docker")
cmd = exec.Command("/bin/sh", "-c", "sudo systemctl daemon-reload && sudo systemctl reload docker")
}

err = cmd.Run()
if err != nil {
return fmt.Errorf(fmt.Sprintf("error re-starting docker: %v", err))
return fmt.Errorf(fmt.Sprintf("error reloading docker: %v", err))
}
}
return nil
Expand Down
18 changes: 18 additions & 0 deletions release-monitor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "step-security/agent release"
release-process:
artifact-location:
github-release:
repo: step-security/agent
reproducible-build:
- artifact: agent_{{.Version}}_linux_amd64.tar.gz
binary: agent
build-command: go build -trimpath -ldflags="-s -w -X main.version={{.Version}} -X main.commit={{.FullCommit}} -X main.date=123"
go-version: 1.17.11
pipeline:
github-action:
repo: step-security/agent
workflow: release.yml
branches:
- main
tags:
- v*

0 comments on commit fd86e39

Please sign in to comment.