Skip to content

Commit

Permalink
chore(docker): Use release_deps when copying files to container images (
Browse files Browse the repository at this point in the history
#1770)

* chore(docker): Use release_deps staging directory during goreleaser build

* copy files from release_deps
  • Loading branch information
Joseph Sirianni authored Jul 25, 2024
1 parent c864ed3 commit 34dac30
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 18 deletions.
30 changes: 18 additions & 12 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,9 @@ dockers:
- "--label=version={{.Version}}"
- "--platform=linux/amd64"
extra_files:
- plugins
- config/example.yaml
- release_deps/VERSION.txt
- release_deps/plugins
- release_deps/config.yaml
- config/logging.stdout.yaml
- LICENSE
- id: scratch-arm64
Expand All @@ -262,8 +263,9 @@ dockers:
- "--label=version={{.Version}}"
- "--platform=linux/arm64"
extra_files:
- plugins
- config/example.yaml
- release_deps/VERSION.txt
- release_deps/plugins
- release_deps/config.yaml
- config/logging.stdout.yaml
- LICENSE
- id: ubuntu-amd64
Expand Down Expand Up @@ -306,8 +308,9 @@ dockers:
- "--label=version={{.Version}}"
- "--platform=linux/amd64"
extra_files:
- plugins
- config/example.yaml
- release_deps/VERSION.txt
- release_deps/plugins
- release_deps/config.yaml
- config/logging.stdout.yaml
- LICENSE
- release_deps/opentelemetry-java-contrib-jmx-metrics.jar
Expand Down Expand Up @@ -351,8 +354,9 @@ dockers:
- "--label=version={{.Version}}"
- "--platform=linux/arm64"
extra_files:
- plugins
- config/example.yaml
- release_deps/VERSION.txt
- release_deps/plugins
- release_deps/config.yaml
- config/logging.stdout.yaml
- LICENSE
- release_deps/opentelemetry-java-contrib-jmx-metrics.jar
Expand All @@ -379,8 +383,9 @@ dockers:
- "--label=version={{.Version}}"
- "--platform=linux/amd64"
extra_files:
- plugins
- config/example.yaml
- release_deps/VERSION.txt
- release_deps/plugins
- release_deps/config.yaml
- config/logging.stdout.yaml
- LICENSE
- release_deps/opentelemetry-java-contrib-jmx-metrics.jar
Expand All @@ -406,8 +411,9 @@ dockers:
- "--label=version={{.Version}}"
- "--platform=linux/arm64"
extra_files:
- plugins
- config/example.yaml
- release_deps/VERSION.txt
- release_deps/plugins
- release_deps/config.yaml
- config/logging.stdout.yaml
- LICENSE
- release_deps/opentelemetry-java-contrib-jmx-metrics.jar
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.scratch
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@ RUN apk update && apk add --no-cache ca-certificates
RUN mkdir /licenses
COPY LICENSE /licenses/observiq-otel-collector.license

COPY plugins /etc/otel/plugins
COPY release_deps/VERSION.txt /etc/otel/VERSION.txt

COPY release_deps/plugins /etc/otel/plugins
COPY config/logging.stdout.yaml /etc/otel/logging.yaml
COPY config/example.yaml /etc/otel/config.yaml
COPY release_deps/config.yaml /etc/otel/config.yaml

# Scratch images contain nothing by default. The built image
# will contain only what was copied into it. This means it
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.ubi8
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,17 @@ ENV PATH="${JAVA_HOME}/bin:${PATH}"
RUN mkdir /licenses
COPY LICENSE /licenses/observiq-otel-collector.license

COPY release_deps/VERSION.txt /etc/otel/VERSION.txt

COPY observiq-otel-collector /collector/observiq-otel-collector
COPY release_deps/opentelemetry-java-contrib-jmx-metrics.jar /opt/opentelemetry-java-contrib-jmx-metrics.jar
COPY plugins /etc/otel/plugins
COPY release_deps/plugins /etc/otel/plugins

COPY config/logging.stdout.yaml /etc/otel/logging.yaml

# Default config allows the agent to run without an injected config, which is required
# when connecting to an OpAMP platform.
COPY config/example.yaml /etc/otel/config.yaml
COPY release_deps/config.yaml /etc/otel/config.yaml

RUN chown otel:otel \
/etc/otel/config.yaml \
Expand Down
6 changes: 4 additions & 2 deletions docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,17 @@ ENV PATH="${JAVA_HOME}/bin:${PATH}"
RUN mkdir /licenses
COPY LICENSE /licenses/observiq-otel-collector.license

COPY release_deps/VERSION.txt /etc/otel/VERSION.txt

COPY observiq-otel-collector /collector/observiq-otel-collector
COPY release_deps/opentelemetry-java-contrib-jmx-metrics.jar /opt/opentelemetry-java-contrib-jmx-metrics.jar
COPY plugins /etc/otel/plugins
COPY release_deps/plugins /etc/otel/plugins

COPY config/logging.stdout.yaml /etc/otel/logging.yaml

# Default config allows the agent to run without an injected config, which is required
# when connecting to an OpAMP platform.
COPY config/example.yaml /etc/otel/config.yaml
COPY release_deps/config.yaml /etc/otel/config.yaml

RUN chown otel:otel \
/etc/otel/config.yaml \
Expand Down

0 comments on commit 34dac30

Please sign in to comment.