-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mikayla Thompson <[email protected]>
- Loading branch information
1 parent
56e5f55
commit 82db99d
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
TrafficCapture/dockerSolution/src/main/docker/otelcol/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Generating the Base Docker Image | ||
|
||
The base docker image currently relies on a custom build of the `otel-contrib-col` binary. This is because several of the features necessary are still under code review. Namely, those features are [adding OpenSearch as a logging export option](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/26475), and [promoting the OpenSearch Exporter to Alpha status](https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/24668). | ||
|
||
These two PRs have been manually merged in a local build, available [here](https://github.com/mikaylathompson/opentelemetry-collector-contrib/tree/opensearch-logs-exporter). | ||
|
||
To generate the binary, suitable to be used on a docker container, in a location outside of this repo: | ||
1. `git clone [email protected]:mikaylathompson/opentelemetry-collector-contrib.git` | ||
2. `cd opentelemetry-collector-contrib` | ||
3. `git checkout opensearch-logs-exporter` | ||
4. `make install-tools` | ||
5. `GOOS=linux GOARCH=amd64 make otelcontribcol` | ||
6. `cp bin/otelcontribcol_linux_amd64 $MIGRATIONS_REPO/TrafficCapture/dockerSolution/src/main/docker/otelcol/` | ||
|
||
|
||
Build a dockerfile like the following to copy the generated binary and a config file onto the container: | ||
|
||
``` | ||
FROM openjdk:11-jre | ||
COPY ./otelcontribcol_linux_amd64 otelcontribcol | ||
RUN chmod +x otelcontribcol | ||
COPY ./otel-config.yml /etc/otel-config.yml | ||
CMD ./otelcontribcol --config /etc/otel-config.yml | ||
``` | ||
|
||
|
||
## Moving past the custom build | ||
When both of the above PRs have been merged into the `otel-contrib-col` mainline and are included in a release, it should be possible to switch from using this custom image to the standard publically released image, using the same config file. |