Charlie Henry
02/22/2023, 7:31 PM@task()
def docker_command(docker_image, environment_variables, command, logger):
response = (
docker.from_env()
.containers.run(
image=docker_image,
command=f"python {command}",
environment=environment_variables,
)
.decode("utf-8")
)
<http://logger.info|logger.info>(response)
Also, I'm using the docker-py python library for this, rather than a block which might also be a solution?Andrew Huang
02/22/2023, 7:35 PM