Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bobgroup-mage
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bob Public Utils
bobgroup-mage
Commits
75e9a9e7
Commit
75e9a9e7
authored
3 years ago
by
Jan Semmelink
Browse files
Options
Downloads
Patches
Plain Diff
Implemented a fix
parent
57694248
No related branches found
No related tags found
1 merge request
!1
Fix for mage run does not stop containers
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
mage_helpers/debug.go
+16
-6
16 additions, 6 deletions
mage_helpers/debug.go
with
16 additions
and
6 deletions
mage_helpers/debug.go
+
16
−
6
View file @
75e9a9e7
...
...
@@ -111,7 +111,7 @@ func runLongRunningSubProcess(ctx context.Context, name string, arg ...string) e
}
func
stopRunningSamDocker
()
{
cli
,
err
:=
client
.
New
Env
Client
(
)
cli
,
err
:=
client
.
NewClient
WithOpts
(
client
.
FromEnv
)
if
err
!=
nil
{
panic
(
err
)
}
...
...
@@ -122,13 +122,23 @@ func stopRunningSamDocker() {
}
for
_
,
container
:=
range
containers
{
mustStop
:=
false
if
container
.
Command
==
"/var/rapid/aws-lambda-rie"
{
mustStop
=
true
}
else
{
for
_
,
port
:=
range
container
.
Ports
{
if
port
.
PrivatePort
==
5986
{
mustStop
=
true
break
}
}
}
if
mustStop
{
err
=
cli
.
ContainerStop
(
context
.
Background
(),
container
.
ID
,
nil
)
if
err
!=
nil
{
panic
(
err
)
}
}
log
.
Printf
(
"Stopped container %s
\n
"
,
container
.
ID
)
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment