Skip to content

Commit 4e0278f

Browse files
committed
Add example how to build static kafka in centos 7
1 parent cf5d732 commit 4e0278f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

examples/static-build/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM registry.gitlab.com/runfor/envs/centos:7-build as static-kafka
2+
3+
RUN set -x \
4+
&& git clone --recurse-submodules https://github.com/tarantool/kafka /opt/kafka \
5+
&& wget -P /etc/yum.repos.d/ https://copr.fedorainfracloud.org/coprs/bgstack15/stackrpms/repo/epel-7/bgstack15-stackrpms-epel-7.repo \
6+
&& yum install -y tarantool tarantool-devel openssl110
7+
8+
WORKDIR /opt/kafka
9+
10+
RUN tarantoolctl rocks STATIC_BUILD=ON make \
11+
&& tarantoolctl rocks pack kafka
12+
13+
FROM scratch as export
14+
COPY --from=static-kafka /opt/kafka/kafka-scm-1.linux-x86_64.rock /

examples/static-build/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Static kafka build
2+
---
3+
4+
```bash
5+
$ docker buildx build --target export --output rocks .
6+
$ ls rocks
7+
kafka-scm-1.linux-x86_64.rock
8+
```

0 commit comments

Comments
 (0)