Skip to content

Commit

Permalink
Remove development packages from Pulsar's docker images (#14093)
Browse files Browse the repository at this point in the history
* Remove development packages from Pulsar's docker images

* Add "--no-install-recommends" to skip installing GCC and lots of other tools

* Install ca-certificates

* Install build-essential for building pulsar-functions-go examples
  • Loading branch information
lhotari authored Feb 2, 2022
1 parent 20af454 commit 14a28d7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions docker/pulsar/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,14 @@ ARG UBUNTU_MIRROR=mirror://mirrors.ubuntu.com/mirrors.txt
RUN sed -i "s|http://archive\.ubuntu\.com/ubuntu/|${UBUNTU_MIRROR:-mirror://mirrors.ubuntu.com/mirrors.txt}|g" /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y dist-upgrade \
&& apt-get -y install openjdk-11-jdk-headless netcat dnsutils less procps iputils-ping \
python3 python3-dev python3-setuptools python3-yaml python3-kazoo \
libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev \
curl \
&& apt-get -y install --no-install-recommends openjdk-11-jdk-headless netcat dnsutils less procps iputils-ping \
python3 python3-yaml python3-kazoo python3-pip \
curl ca-certificates \
&& apt-get -y --purge autoremove \
&& apt-get autoclean \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python3 get-pip.py

RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10

ENV JAVA_HOME /usr/lib/jvm/java-11-openjdk-amd64
Expand Down
2 changes: 1 addition & 1 deletion tests/docker-images/latest-version-image/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ FROM apachepulsar/pulsar:latest as pulsar-function-go
USER root

RUN rm -rf /var/lib/apt/lists/* && apt-get update
RUN apt-get install -y procps curl git
RUN apt-get install -y procps curl git build-essential

ENV GOLANG_VERSION 1.13.3

Expand Down

0 comments on commit 14a28d7

Please sign in to comment.