Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/fix-port-int' into local-test-to…
Browse files Browse the repository at this point in the history
…gether
  • Loading branch information
jzaefferer committed Apr 18, 2018
2 parents e353a67 + 2adb05e commit 4a04fd0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/converter/sloppy_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ func NewSloppyFile(cf *ComposeFile) (*SloppyFile, error) {
switch entry.(type) { // number, string, obj
case string:
ports = append(ports, entry.(string))
case float64:
ports = append(ports, strconv.Itoa(int(entry.(float64))))
case int:
p := strconv.Itoa(entry.(int))
ports = append(ports, p)
Expand Down
2 changes: 2 additions & 0 deletions pkg/converter/testdata/docker-compose-v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ services:
limits:
memory: 2G
command: mongod
ports:
- 27017 # container port
volumes:
db:
content:
1 change: 1 addition & 0 deletions pkg/converter/testdata/golden0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ services:
cmd: mongod
image: mongodb
mem: 2048
port: 27017
wordpress:
cmd: /code/entrypoint.sh -foo bar
dependencies:
Expand Down

0 comments on commit 4a04fd0

Please sign in to comment.