Files
scylladb/tools/toolchain/Dockerfile
Pekka Enberg f7cf04ac4b tools/toolchain: Clean up DNF cache from Docker image
Make sure we call "dnf clean all" to remove the DNF cache, which reduces
Docker image size as per the following guidelines:

https://github.com/fedora-cloud/Fedora-Dockerfiles/wiki/Guidelines-for-Creating-Dockerfiles

A freshly built image is 250 MB smaller than the one on Docker Hub:

  <none>                                <none>               b8cafc8ff557        16 seconds ago      1.2 GB
  docker.io/scylladb/scylla-toolchain   fedora-29-20190212   d253d45a964c        3 days ago          1.45 GB

Message-Id: <20190215142322.12466-1-penberg@scylladb.com>
2019-02-16 17:12:10 +02:00

13 lines
486 B
Docker

FROM fedora:29
ADD ./install-dependencies.sh ./
ADD ./seastar/install-dependencies.sh ./seastar/
ADD ./tools/toolchain/system-auth ./
RUN dnf -y install 'dnf-command(copr)' \
&& dnf -y copr enable scylladb/toolchain \
&& dnf -y install ccache \
&& /bin/bash -x ./install-dependencies.sh && dnf -y update && dnf clean all \
&& echo 'ALL ALL=(ALL:ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& cp system-auth /etc/pam.d \
&& echo 'Defaults !requiretty' >> /etc/sudoers