Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate centos7 to ubuntu 22.10, reduce image size #3492

Merged
merged 4 commits into from
Sep 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,14 @@ ENV DEBIAN_FRONTEND=noninteractive
RUN set -x \
&& adduser "${BK_USER}" \
&& apt-get update \
&& apt-get install -y openjdk-17-jdk \
&& apt-get install -y python3 pip \
&& apt-get install -y --no-install-recommends openjdk-17-jdk \
&& apt-get install -y --no-install-recommends python3 pip \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& apt-get install -y gcc g++ \
&& apt-get install -y wget sudo \
&& apt-get clean all \
&& apt-get install -y --no-install-recommends gpg gpg-agent wget sudo \
&& apt-get -y --purge autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& mkdir -pv /opt \
&& cd /opt \
&& wget -q "${DISTRO_URL}" \
Expand All @@ -56,8 +58,7 @@ RUN set -x \
&& tar -xzf "$DISTRO_NAME.tar.gz" \
&& mv bookkeeper-server-${BK_VERSION}/ /opt/bookkeeper/ \
&& rm -rf "$DISTRO_NAME.tar.gz" "$DISTRO_NAME.tar.gz.asc" "$DISTRO_NAME.tar.gz.sha512" \
&& pip install zk-shell \
&& ls /usr/lib/jvm
&& pip install zk-shell

WORKDIR /opt/bookkeeper

Expand Down
25 changes: 17 additions & 8 deletions tests/docker-images/statestore-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,36 @@
# under the License.
#

FROM centos:7
FROM ubuntu:22.10
MAINTAINER Apache BookKeeper <dev@bookkeeper.apache.org>

ARG TARGETARCH

#ENV OPTS="$OPTS -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"
ENV BOOKIE_PORT=3181
ENV BOOKIE_HTTP_PORT=8080
ENV BOOKIE_GRPC_PORT=4181
EXPOSE ${BOOKIE_PORT} ${BOOKIE_HTTP_PORT} ${BOOKIE_GRPC_PORT}
ENV BK_USER=bookkeeper
ENV BK_HOME=/opt/bookkeeper
ENV JAVA_HOME=/usr/lib/jvm/java-11
ENV JAVA_HOME /usr/lib/jvm/java-17-openjdk-$TARGETARCH
ENV DEBIAN_FRONTEND=noninteractive


RUN set -x \
&& adduser "${BK_USER}" \
&& yum install -y java-11-openjdk-devel wget bash python-pip python-devel sudo netcat gcc gcc-c++ \
&& wget -q https://bootstrap.pypa.io/pip/2.7/get-pip.py \
&& python get-pip.py \
&& apt-get update \
&& apt-get install -y --no-install-recommends openjdk-17-jdk \
&& apt-get install -y --no-install-recommends python3 pip \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& apt-get install -y --no-install-recommends gpg gpg-agent wget sudo \
&& apt-get -y --purge autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
&& pip install zk-shell \
&& rm -rf get-pip.py \
&& mkdir -pv /opt \
&& cd /opt \
&& yum clean all
&& cd /opt

WORKDIR /opt/bookkeeper
RUN mkdir /opt/bookkeeper/lib
Expand Down