Skip to content

Commit

Permalink
SOLR-16752: Reduce attack surface and size for Docker image (#1575)
Browse files Browse the repository at this point in the history
(cherry picked from commit 8a0bf24)
  • Loading branch information
bqcuong authored and HoustonPutman committed Apr 19, 2023
1 parent 5d25fb3 commit b1b9064
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions solr/CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ Improvements

* SOLR-16504: Convert CLI tools to use Jetty HTTP 2 client. (Bence Szabo via Eric Pugh)

* SOLR-16752: Docker: Leave out optional apt packages, slightly reducing image size and lowering attack surface (Quang-Cuong Bui)

Optimizations
---------------------

Expand Down
2 changes: 1 addition & 1 deletion solr/docker/templates/Dockerfile.body.template
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ RUN set -ex; \

RUN set -ex; \
apt-get update; \
apt-get -y install acl lsof procps wget netcat gosu tini jattach; \
apt-get -y --no-install-recommends install acl lsof procps wget netcat gosu tini jattach; \
rm -rf /var/lib/apt/lists/*;

VOLUME /var/solr
Expand Down
2 changes: 1 addition & 1 deletion solr/docker/templates/Dockerfile.official.header.template
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ARG SOLR_ARCHIVE_URL="https://archive.apache.org/dist/solr/solr/$SOLR_VERSION/so

RUN set -ex; \
apt-get update; \
apt-get -y install wget gpg dirmngr; \
apt-get -y --no-install-recommends install wget gpg gnupg dirmngr; \
rm -rf /var/lib/apt/lists/*; \
export GNUPGHOME="/tmp/gnupg_home"; \
mkdir -p "$GNUPGHOME"; \
Expand Down

0 comments on commit b1b9064

Please sign in to comment.