Make sure Storlet Docker images don't include apt cache
This patch makes Storlet Docker images not to include apt cache. It reduces the size of docker images, and make it easy to deploy them. Change-Id: I9fb7eb27d9a126cb2347ce7aea38141f6096e068
This commit is contained in:
@@ -17,13 +17,16 @@ FROM {{ inventory_hostname }}:{{ docker_registry_port }}/ubuntu_14.04
|
||||
|
||||
MAINTAINER {{ base_image_maintainer }}
|
||||
|
||||
RUN ["apt-get", "update"]
|
||||
RUN ["apt-get", "install", "python", "-y"]
|
||||
RUN ["apt-get", "install", "software-properties-common", "-y"]
|
||||
RUN ["add-apt-repository", "ppa:webupd8team/java"]
|
||||
RUN ["apt-get", "update"]
|
||||
RUN echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections
|
||||
RUN ["apt-get", "install", "oracle-java8-installer", "-y"]
|
||||
# The following operations shoud be defined in one line
|
||||
# to prevent docker images from including apt cache file.
|
||||
RUN apt-get update && \
|
||||
apt-get install python -y && \
|
||||
apt-get install software-properties-common -y && \
|
||||
add-apt-repository ppa:webupd8team/java && \
|
||||
apt-get update && \
|
||||
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections && \
|
||||
apt-get install oracle-java8-installer -y && \
|
||||
apt-get clean
|
||||
|
||||
COPY logback-classic-1.1.2.jar /opt/ibm/
|
||||
RUN ["chmod", "0744", "/opt/ibm/logback-classic-1.1.2.jar"]
|
||||
|
||||
Reference in New Issue
Block a user