Skip to content

Commit e297a75

Browse files
authored
docker: build and push docker builder image (#297)
Signed-off-by: Florian Lehner <florian.lehner@elastic.co>
1 parent 2233ca6 commit e297a75

File tree

3 files changed

+39
-3
lines changed

3 files changed

+39
-3
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: "Update builder docker image"
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths:
7+
- "Dockerfile"
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
- name: Set up environment
16+
uses: ./.github/workflows/env
17+
- name: Login to Docker Hub
18+
uses: docker/login-action@v3
19+
with:
20+
username: ${{ secrets.DOCKER_USERNAME }}
21+
password: ${{ secrets.DOCKER_PASSWORD }}
22+
- name: Set up QEMU
23+
uses: docker/setup-qemu-action@v3
24+
- name: Set up Docker Buildx
25+
uses: docker/setup-buildx-action@v3
26+
- name: Set current timestamp tag
27+
id: tag
28+
run: |
29+
echo "tag=$(date +%Y%m%d%H%M)" >> $GITHUB_OUTPUT
30+
- name: Build and push
31+
uses: docker/build-push-action@v6
32+
with:
33+
push: true
34+
file: Dockerfile
35+
platforms: linux/amd64,linux/arm64
36+
tags: otel/opentelemetry-ebpf-profiler-dev:latest,otel/opentelemetry-ebpf-profiler-dev:${{ steps.tag.outputs.tag }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:testing
1+
FROM debian:testing-20241223-slim
22

33
WORKDIR /agent
44

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ docker-image:
119119
docker build -t profiling-agent -f Dockerfile .
120120

121121
agent:
122-
docker run -v "$$PWD":/agent -it --rm --user $(shell id -u):$(shell id -g) profiling-agent \
122+
docker run -v "$$PWD":/agent -it --rm --user $(shell id -u):$(shell id -g) otel/opentelemetry-ebpf-profiler-dev:latest \
123123
"make TARGET_ARCH=$(TARGET_ARCH) VERSION=$(VERSION) REVISION=$(REVISION) BUILD_TIMESTAMP=$(BUILD_TIMESTAMP)"
124124

125125
debug-agent:
126-
docker run -v "$$PWD":/agent -it --rm --user $(shell id -u):$(shell id -g) profiling-agent \
126+
docker run -v "$$PWD":/agent -it --rm --user $(shell id -u):$(shell id -g) otel/opentelemetry-ebpf-profiler-dev:latest \
127127
"make TARGET_ARCH=$(TARGET_ARCH) VERSION=$(VERSION) REVISION=$(REVISION) BUILD_TIMESTAMP=$(BUILD_TIMESTAMP) debug"
128128

129129
legal:

0 commit comments

Comments
 (0)