forked from UrbanCompass/librdkafka
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dockerfile && docker image actions
- Loading branch information
Showing
3 changed files
with
47 additions
and
32 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
name: build | ||
on: [push] | ||
jobs: | ||
docker: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
- name: Login to Docker Hub | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and push | ||
uses: docker/build-push-action@v5 | ||
with: | ||
platforms: linux/amd64 | ||
context: . | ||
push: true | ||
tags: ghcr.io/bluegroundltd/librdkafka:latest |
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,24 @@ | ||
FROM --platform=linux/amd64 debian:bullseye-slim AS rdkafka-builder | ||
RUN apt-get update && apt-get install -yqq \ | ||
build-essential \ | ||
git \ | ||
libcurl4-openssl-dev \ | ||
liblz4-dev \ | ||
libsasl2-dev \ | ||
libssl-dev \ | ||
libtool-bin \ | ||
libxml2-dev \ | ||
libzstd-dev \ | ||
pkg-config \ | ||
python3 \ | ||
rapidjson-dev \ | ||
zlib1g-dev | ||
|
||
# linking the libxml library where the librdkafka build script expects it | ||
RUN ln -sf /usr/lib/x86_64-linux-gnu/pkgconfig/libxml-2.0.pc /usr/lib/x86_64-linux-gnu/pkgconfig/libxml2.pc | ||
|
||
COPY . . | ||
|
||
RUN ./configure && \ | ||
make && \ | ||
make install |