fix: exposed port

Signed-off-by: Matej Vasek <mvasek@redhat.com>
This commit is contained in:
Matej Vasek 2021-03-29 23:53:00 +02:00 committed by GitHub
parent e1a7af50d2
commit 7ed2e86d96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -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",
@ -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{