Files
my-rook-config/images/base/Dockerfile.rootfs-builder
T
Bassam Tabbara 78c07696b4 build: revisit caching of images
image caching is now simplified and works based on a single timestamp as the image tag.
2017-06-20 20:57:46 -07:00

46 lines
1.6 KiB
Docker

# Copyright 2016 The Rook Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM BASEIMAGE
RUN sed -i -e 's/^deb-src/#deb-src/' /etc/apt/sources.list && \
# update and upgrade
DEBIAN_FRONTEND=noninteractive apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -yy --no-install-recommends \
net-tools \
netcat && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade -yy --no-install-recommends && \
# cleanup
DEBIAN_FRONTEND=noninteractive apt-get autoremove -y && \
DEBIAN_FRONTEND=noninteractive apt-get clean -y
RUN \
# keep the copyright files
tar -czf /usr/share/copyrights.tar.xz /usr/share/doc/*/copyright && \
# remove unecessary files
rm -rf \
/usr/share/doc \
/usr/share/man \
/usr/share/info \
/usr/share/locale \
/var/lib/apt/lists/* \
/var/log/* \
/var/cache/debconf/* \
/etc/systemd \
/lib/lsb \
/lib/udev \
/usr/lib/x86_64-linux-gnu/gconv/IBM* \
/usr/lib/x86_64-linux-gnu/gconv/EBC* && \
mkdir -p /usr/share/man/man{1..8}