Skip to content

Commit

Permalink
memorylimit option
Browse files Browse the repository at this point in the history
  • Loading branch information
Sam Ban committed Sep 29, 2021
1 parent ced4d59 commit b3d6936
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,12 @@ func (d *Docker) Run(ctx context.Context, image, imageurl string, labels map[str
hostconfig.NanoCPUs = nano
}

if len(conf["memorylimit"]) > 0 {
mem, _ := strconv.ParseInt(conf["memorylimit"][0], 10, 64)
log.Printf("Memory Limit: %v", mem)
hostconfig.Memory = mem
}

links := []string{}
for _, l := range conf["links"] {
l2, err := filehelper.Template(l, running)
Expand Down

0 comments on commit b3d6936

Please sign in to comment.