Skip to content

Commit

Permalink
fix(docker-build): update gh-action and otel Dockerfile (#303)
Browse files Browse the repository at this point in the history
* fix(docker-build): update gh-action and otel Dockerfile

* fix(docker-build): undo changes
  • Loading branch information
richardtief authored Aug 14, 2024
1 parent 557ec35 commit d9431f4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ on:
branches:
- main
paths:
- cmd/**
- pkg/**
- website/**
- Dockerfile
- Dockerfile.*
- go.mod
- go.sum
tags:
- v*.*.*

Expand Down Expand Up @@ -110,7 +104,7 @@ jobs:
# cache-to: type=gha,mode=max
platforms: |
linux/amd64
# linux/arm64
linux/arm64
# Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker
Expand Down Expand Up @@ -152,7 +146,6 @@ jobs:
with:
image-ref: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.Imagename }}:${{ github.sha }}
ignore-unfixed: true
exit-code: '1'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
Expand Down
10 changes: 6 additions & 4 deletions Dockerfile.otel-collector
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
FROM debian:latest as journal
RUN apt update
RUN apt install -y systemd libssl-dev
FROM ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest
FROM --platform=${BUILDPLATFORM:-linux/amd64} debian:latest as journal

Check warning on line 1 in Dockerfile.otel-collector

View workflow job for this annotation

GitHub Actions / Build (Dockerfile.otel-collector, opentelemetry-collector-contrib)

The 'as' keyword should match the case of the 'from' keyword

FromAsCasing: 'as' and 'FROM' keywords' casing do not match More info: https://docs.docker.com/go/dockerfile/rule/from-as-casing/
RUN apt update \
&& apt upgrade -y \
&& apt autoremove -y \
&& apt install -y systemd libssl-dev
FROM --platform=${BUILDPLATFORM:-linux/amd64} ghcr.io/open-telemetry/opentelemetry-collector-releases/opentelemetry-collector-contrib:latest
LABEL source_repository="https://github.com/greenhouse-extensions"
COPY --from=journal /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
COPY --from=journal /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
Expand Down

0 comments on commit d9431f4

Please sign in to comment.