-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fix] Fix issues with Pulsar Alpine docker image stability: remove gl…
- Loading branch information
Showing
19 changed files
with
469 additions
and
243 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,90 @@ | ||
# | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, | ||
# software distributed under the License is distributed on an | ||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
# KIND, either express or implied. See the License for the | ||
# specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
|
||
ARG ALPINE_VERSION=3.20 | ||
|
||
# Builds an Alpine image with kinesis_producer compiled for Alpine Linux / musl | ||
|
||
# Build stage | ||
FROM alpine:$ALPINE_VERSION AS kinesis-producer-build | ||
ENV KINESIS_PRODUCER_LIB_VERSION=0.15.12 | ||
|
||
# Install build dependencies | ||
RUN apk update && apk add --no-cache \ | ||
git \ | ||
binutils \ | ||
coreutils \ | ||
alpine-sdk \ | ||
util-linux \ | ||
cmake \ | ||
autoconf \ | ||
automake \ | ||
libtool \ | ||
curl \ | ||
bash \ | ||
tar \ | ||
libuuid \ | ||
linux-headers \ | ||
zlib \ | ||
zlib-dev \ | ||
perl \ | ||
wget \ | ||
boost-dev \ | ||
openssl-dev \ | ||
curl-dev \ | ||
build-base \ | ||
util-linux-dev \ | ||
g++ \ | ||
make \ | ||
upx | ||
|
||
ENV LANG=C.UTF-8 | ||
|
||
RUN mkdir /build | ||
COPY kinesis_producer_alpine.patch /build/ | ||
|
||
# Clone KPL and copy build script | ||
RUN cd /build && \ | ||
git clone --depth 1 --single-branch --branch v${KINESIS_PRODUCER_LIB_VERSION} https://github.com/awslabs/amazon-kinesis-producer && \ | ||
cd amazon-kinesis-producer && \ | ||
git apply ../kinesis_producer_alpine.patch | ||
|
||
# Copy and execute build script | ||
COPY build-alpine.sh /build/ | ||
RUN chmod +x /build/build-alpine.sh | ||
RUN /build/build-alpine.sh | ||
|
||
# Final stage | ||
FROM alpine:$ALPINE_VERSION | ||
COPY --from=kinesis-producer-build /opt/amazon-kinesis-producer /opt/amazon-kinesis-producer | ||
RUN apk update && apk add --no-cache \ | ||
brotli-libs \ | ||
c-ares \ | ||
libcrypto3 \ | ||
libcurl \ | ||
libgcc \ | ||
libidn2 \ | ||
libpsl \ | ||
libssl3 \ | ||
libunistring \ | ||
nghttp2-libs \ | ||
zlib \ | ||
zstd-libs \ | ||
libuuid | ||
WORKDIR /opt/amazon-kinesis-producer/bin |
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
Oops, something went wrong.