Consul-template: New simpler Docker image in 0.26.0 is insufficient (need removed features)

Created on 11 Jun 2021  路  8Comments  路  Source: hashicorp/consul-template

I created this issue as I expect there to be a at least a few people form whom the new Docker images will break their current workflows. If this is you please comment here with...

  1. the image you currently use
  2. which features you rely on

I apologize for any inconvenience this may have caused and if a simple base image can't be made to work for everyone, I'll be sure to make getting a 0.26.1 with an updated docker image out a top priority. I didn't want to just propagate the old Docker setup as it needs some serious work, but I really wanted some feedback on what's currently used before doing that.

Thanks.

docker enhancement

All 8 comments

  1. We were using 0.25.2-alpine.
  2. We relied on the ENTRYPOINT instruction to specify the executable /bin/consul-template for us.

We pass arguments for the consul-template executable directly in our Kubernetes deployment file's args field, like:

        args:
          [
            "-config=/path/to/mounted/hcl/file.hcl",
            "-log-level=debug",
            "-once",
          ]

Docker equivalent:

docker run hashicorp/consul-template -config=/path/to/mounted/hcl/file.hcl -log-level=debug -once

Now that there is no entrypoint we need to specify the executable in addition to its arguments:

        args:
          [
            "/bin/consul-template",
            "-config=/path/to/mounted/hcl/file.hcl",
            "-log-level=debug",
            "-once",
          ]

Docker equivalent:

docker run hashicorp/consul-template /bin/consul-template -config=/path/to/mounted/hcl/file.hcl -log-level=debug -once

Hey @jklawrence, thanks for replying. I really appreciate the feedback.

Mind if I ask how do you get the config file in the container? Do you include it as part of a derived image (using our image as a base image and extending it), or via a bind mount or some other way?

Thanks.

Hi @eikenb. We use the consul-template image directly and add the config file via a bind mount.

For background, we make use of both the vault and consul-template containers as initContainers to load secrets from our Vault instance and output formatted configuration file(s) for our application container.

Thanks. I'll be pushing up a PR with a new Dockerfile + supporting scripts soon. Condensing things down to 1 Alpine Linux based image where I've reviewed, modernized and simplified things as I can.

PR is up... #1484.

Thank you @eikenb, that looks like that would work for us!

Thanks for the feedback @jklawrence.

I'm going to give it a few days to give others a (albeit small) chance to chime in and I'd like to get the new shell parsing issue in the update as well (waiting on upstream to review my PR there).

Merged the PR and I think it should be good for all the common use cases. I'm going to close this general bug and recommend people file new issues if needed.

Was this page helpful?
0 / 5 - 0 ratings