Skip to content

Commit

Permalink
fix: exposed port
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <mvasek@redhat.com>
  • Loading branch information
matejvasek authored Mar 29, 2021
1 parent e1a7af5 commit 7ed2e86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docker/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ func (n *Runner) Run(ctx context.Context, f bosonFunc.Function) error {
envs = append(envs, "VERBOSE=true")
}

httpPort := nat.Port("8080/tcp")
ports := map[nat.Port][]nat.PortBinding{
nat.Port("8080/tcp"): {
httpPort: {
nat.PortBinding{
HostPort: "8080",
HostIP: "127.0.0.1",
Expand All @@ -68,6 +69,7 @@ func (n *Runner) Run(ctx context.Context, f bosonFunc.Function) error {
AttachStdout: true,
AttachStdin: false,
Image: f.Image,
ExposedPorts: map[nat.Port]struct{}{httpPort: {}},
}

hostConf := &container.HostConfig{
Expand Down

0 comments on commit 7ed2e86

Please sign in to comment.