Update Dockerfiles to add backend.enable option to Postgres #1492
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been attempting to run a Dockerized Cygnus to connect to a Postgres database. The changes in this PR enable me to do so.
Currently when I docker-compose using default values, I can't successfully add any data to Postgres since I get the #1467 issue. This is because the default value (
postgresql-sink.backend.enable_cache = false
) causes a null pointer error since the cache is uninitialized.A value for
postgresql-sink.backend.enable_cache
does not exist in theagent.conf
which is copied over when the entrypoint point is run, and no environment variable exists to override it, therefore I'm stuck with the broken default value without creating my own custom Docker file.This amendment adds the default value (
false
) to the Dockeragent.conf
and ensures that the dummy fileagent.conf
in the same folder as theDockerfile
gets copied into the image correctly. Note thatagent.conf
must be copied twice , since the docker-cygnus agent version is used ifCYGNUS_MULTIAGENT
is not set. The default value can be overwritten using an environment variable (CYGNUS_POSTGRESQL_ENABLE_CACHE
)The
entrypoint
has been amended to copy the external configuration files into the container using the DockerCOPY
command rather than copying the internal files from within the downloaded github repository using the bashcp
command. This allows a user to more easily override the default dummyagent.conf
with their own files regardless of whetherCYGNUS_MULTIAGENT
is set.Using Docker
COPY
is preferred, since ordinary users won't have push rights to the git repo - see #1418 which proposes similar changes.