In Ch.2, section "Building container images in Minikube with Ansible", the command to build the image if it's not already built is:
docker build -t {{ image_name }} ../hello-go
This is fine, but I had to double check that I was in the right place, but couldn't find any clear indication of where in the directory tree I should be. This ../hello-go was assuming I was in a directory parallel to hello-go/, and I wasn't. Perhaps it's worth being more explicit?
The text was updated successfully, but these errors were encountered:
You make a good point—I think I wrote that section from the perspective of this repository's code layout, but never explicitly said to create the automation playbook in a separate directory adjacent to the hello-go app directory.
I've updated the text and added this to the text around the playbook's start:
Crate a new directory hello-go-automation (next to the hello-go directory) with the same inventory file as used in the previous example, and add a main.yml playbook. Start the playbook...
And I added this after that particular docker build command task:
Because this playbook is in a directory adjacent to the hello-go example (which contains the image build Dockerfile), the context passed to the docker build command is ../hello-go. This directs Docker to look for a Dockerfile inside the hello-go directory adjacent to this playbook's hello-go-automation directory.
In Ch.2, section "Building container images in Minikube with Ansible", the command to build the image if it's not already built is:
This is fine, but I had to double check that I was in the right place, but couldn't find any clear indication of where in the directory tree I should be. This
../hello-go
was assuming I was in a directory parallel tohello-go/
, and I wasn't. Perhaps it's worth being more explicit?The text was updated successfully, but these errors were encountered: