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 Dockerfile from centos to ubuntu #3483

Merged
merged 1 commit into from
Sep 13, 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
24 changes: 13 additions & 11 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
# under the License.
#

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

ARG BK_VERSION=4.12.1
ARG TARGETARCH

ARG BK_VERSION=4.15.1
ARG DISTRO_NAME=bookkeeper-server-${BK_VERSION}-bin
ARG DISTRO_URL=https://archive.apache.org/dist/bookkeeper/bookkeeper-${BK_VERSION}/${DISTRO_NAME}.tar.gz

Expand All @@ -29,12 +31,19 @@ ENV BOOKIE_HTTP_PORT=8080
EXPOSE $BOOKIE_PORT $BOOKIE_HTTP_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

# Download Apache Bookkeeper, untar and clean up
RUN set -x \
&& adduser "${BK_USER}" \
&& yum install -y java-11-openjdk-devel wget bash python3 sudo\
&& apt-get update \
&& apt-get install -y openjdk-17-jdk \
&& apt-get install -y 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 \
&& mkdir -pv /opt \
&& cd /opt \
&& wget -q "${DISTRO_URL}" \
Expand All @@ -47,14 +56,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" \
# install zookeeper shell
&& wget -q https://bootstrap.pypa.io/pip/2.7/get-pip.py \
&& python --version \
&& python get-pip.py \
&& pip install zk-shell \
&& rm -rf get-pip.py \
&& yum remove -y wget \
&& yum clean all \
&& ls /usr/lib/jvm

WORKDIR /opt/bookkeeper
Expand Down
3 changes: 0 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ services:
links:
- zookeeper
environment:
- JAVA_HOME=/usr/lib/jvm/java-11
- BK_zkServers=zookeeper:2181
- BK_zkLedgersRootPath=/ledgers

Expand All @@ -38,7 +37,6 @@ services:
links:
- zookeeper
environment:
- JAVA_HOME=/usr/lib/jvm/java-11
- BK_zkServers=zookeeper:2181
- BK_zkLedgersRootPath=/ledgers

Expand All @@ -48,7 +46,6 @@ services:
links:
- zookeeper
environment:
- JAVA_HOME=/usr/lib/jvm/java-11
- BK_zkServers=zookeeper:2181
- BK_zkLedgersRootPath=/ledgers

Expand Down