Skip to content

Instantly share code, notes, and snippets.

@RunsFor
Created January 21, 2021 17:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RunsFor/d1096be5c3ba7a3d54ef0b09be0c6d87 to your computer and use it in GitHub Desktop.
Save RunsFor/d1096be5c3ba7a3d54ef0b09be0c6d87 to your computer and use it in GitHub Desktop.
Example on how to build static kafka module for use with static tarantool build
docker buildx build --target export --output rocks .
# It copies kafka rock into rocks directory
FROM registry.gitlab.com/runfor/envs/centos:7-build as static-kafka
RUN set -x \
&& git clone --recurse-submodules https://github.com/tarantool/kafka /opt/kafka \
&& wget -P /etc/yum.repos.d/ https://copr.fedorainfracloud.org/coprs/bgstack15/stackrpms/repo/epel-7/bgstack15-stackrpms-epel-7.repo \
&& yum install -y tarantool tarantool-devel openssl110 zip
WORKDIR /opt/kafka
RUN tarantoolctl rocks STATIC_BUILD=ON make \
&& tarantoolctl rocks pack kafka
FROM scratch as export
COPY --from=static-kafka /opt/kafka/kafka-scm-1.linux-x86_64.rock /
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment