Building container images

In order to build the container with the previous example that takes one argument (runfile), we can use docker build --tag my_tag_name --build-arg runfile=path_to_omnis_dot_run . whilst inside the directory containing the Dockerfile (hence the final dot in the command).

For more details about the Docker build option, see documentation.

We do not have to use --tag, but it makes it much easier when referring to the image, e.g. when deploying or launching it locally.

Once your container image is built, you can deploy it anywhere. We had a great experience with AWS' ECS (Elastic Container Service) to run containers and ECR (Elastic Container Registry) to push built container images to a private container image repository.