Skip to content

Commit

Permalink
release: build multi-arch docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
Gandem committed Aug 12, 2024
1 parent 63744cd commit 0a4a96e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ jobs:
needs: [build]
runs-on: ubuntu-24.04
steps:
- name: Check out
uses: actions/checkout@v4
- name: Setup buildx
uses: docker/setup-buildx-action@v3
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Create assets
Expand Down Expand Up @@ -305,3 +309,6 @@ jobs:
prerelease: true
draft: false
tag: ${{ env.RELEASE_VERSION }}
- name: Build and push container image
run: |
docker buildx build -f Dockerfile.release --platform linux/amd64,linux/arm64 -t ghcr.io/datadog/otel-profiling-agent:${{ env.RELEASE_VERSION }} .
18 changes: 18 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu:24.04

USER root

RUN apt-get update && \
apt-get install -y --no-install-recommends binutils curl sudo ca-certificates

COPY agent-* sha256sums.txt /tmp/

RUN sha256sum -c /tmp/sha256sums.txt \
&& mv /tmp/agent-$(uname -p) /usr/local/bin/otel-profiling-agent \
&& chmod +x /usr/local/bin/otel-profiling-agent \
&& rm -rf /tmp/agent*

RUN apt-get clean && \
rm -rf /var/lib/apt/lists/*

CMD ["/bin/sh", "-c", "sudo -E /usr/local/bin/otel-profiling-agent"]

0 comments on commit 0a4a96e

Please sign in to comment.