Skip to content

Commit f5605c2

Browse files
authored
hardcode published port (#14)
1 parent 4a3efca commit f5605c2

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

tasks.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,12 @@ def generate_reqs(ctx):
7676

7777

7878
@invoke.task
79-
def docker(
80-
ctx, build=False, run=False, tag="covid-tracker-api:latest", port=80, name=f"covid-api-{random.randint(0,999)}"
81-
): # pylint: disable=too-many-arguments
79+
def docker(ctx, build=False, run=False, tag="covid-tracker-api:latest", name=f"covid-api-{random.randint(0,999)}"):
8280
"""Build and run docker container."""
8381
if not any([build, run]):
8482
raise invoke.Exit(message="Specify either --build or --run", code=1)
8583
if build:
8684
docker_cmds = ["build", "."]
8785
else:
88-
docker_cmds = ["run", "-p", str(port), "--name", name]
86+
docker_cmds = ["run", "--publish", "80", "--name", name]
8987
ctx.run(" ".join(["docker", *docker_cmds, "-t", tag]))

0 commit comments

Comments
 (0)