This repository has been archived by the owner on Sep 12, 2023. It is now read-only.
Added Docker and Docker Compose configuration for AWS Health Exporter #60
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.
Description
This PR introduces a set of changes aimed at optimizing the Docker configuration for the AWS Health Exporter. The focus of these changes is to enable the use of Docker Compose for easier management of the AWS Health Exporter service, as well as to streamline the process of passing AWS credentials to the Docker container.
Maintainer Tag:
@smon, @kdomanski, @jadolg
Key changes:
Dockerfile: The Dockerfile has been updated to use a two-stage build process. The application is built in the first stage using the
golang:1.20-alpine3.18
image, and the resulting binary is then copied to the final image, which is based ongcr.io/distroless/base
. This ensures that the final image is optimized and contains only the bare essentials needed to run the application.docker-compose.yaml: A new Docker Compose configuration has been introduced. This configuration makes it easy to build and run the AWS Health Exporter service. It also allows AWS credentials to be passed to the service via environment variables, which are sourced from an
.env
file..env.example: An example
.env
file has been added to guide users in setting up their own.env
file with their AWS credentials..gitignore: The
.gitignore
file has been updated to prevent the.env
file, which may contain sensitive AWS credentials, from being committed to the repository.Note:
My take: Do not use docker-compose on production. Use it to test.
There are better technologies out there for container orchestration.