Currently, we install ca-certificates package only on the builder, not
on the docker image which is distributed to the user. Without CA
certificates, we see errors like below,
```
2024-09-18T05:30:46.112001Z ERROR Connecting to PostgreSQL <host name>: SSL verify error: 20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
DB-CONNECTION-ERROR: Failed to connect to pgsql at "<host name>" (port 30025) as user "tsdbadmin": SSL verify error: 20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
An unhandled error condition has been signalled:
Failed to connect to pgsql at "<host name>" (port 30025) as user "tsdbadmin": SSL verify error: 20 X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
```
Signed-off-by: Arunprasad Rajkumar <ar.arunprasad@gmail.com>
That building script does not rely on buildapp, which might be an advantage
in docker environments: first it's one less dependency, second, we have seen
weird error cases when using buildapp.
* Add dockerfiles to .dockerignore
Otherwise changes in the dockerfiles would invalidate the cache
* Rewrite Dockerfile
- Fix deprecated MAINTAINER instruction
- Move maintainer label to the bottom (improving cache)
- Tidy up apt-get
- Use COPY instead of ADD
see https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy
- Remove WORKDIR instruction (we don't really need this)
- Combine remaining RUN layers to reduce layer count
- Move final binary instead of copying (reduce image size)
* Use -slim image an multistage build
Reduce size by using multistage builds and the -slim image.
Use debian:stable instead of an specific code name (future proof).
* [cosmetic] indent Dockerfile instructions
Make it easier to see where a new build stage begins
* Rewrite Dockerfile.ccl
Apply the same changes to Dockerfile.ccl as we did for Dockerfile
When building from sources within the git environement, the version
number is ok, but it was wrong when building in the docker image. Fix
the version number to 3.3.0.50 to show that we're talking about a
development snapshot that is leading to version 3.3.1.
Yeah, 4 parts version numbers. That happens, apparently.
Apparently it's quite common nowadays for people to use docker to build
and run software in a contained way, so provide users with the facility
they need in order to do that.