All Ubuntu wiley repositories are added to my Dockerfile, namely main, universe, etc. and are present in my docker image. However, apt-get install in the following Dockerfile is not able to locate any ZIP/UnZIP packages. Error log in the end.
How can I install these common zip packages? At least p7zip-full and rar.
Dockerfile
FROM ubuntu:15.10
CMD ["bash"]
RUN add-apt-repository main && \
    add-apt-repository universe && \
    add-apt-repository restricted && \
    add-apt-repository multiverse
RUN  apt-get update -y && \
     apt-get upgrade -y && \
     apt-get dist-upgrade -y && \
     apt-get -y autoremove && \
     apt-get clean
RUN apt-get install p7zip \
    p7zip-full \
    p7zip-rar \
    unace \
    unrar \
    zip \
    unzip \
    xz-utils \
    sharutils \
    rar \
    uudeview \
    mpack \
    arj \
    cabextract \
    file-roller \
    && rm -rf /var/lib/apt/lists/*
ERROR THROWN
E: Unable to locate package p7zip-full
E: Unable to locate package unace
E: Unable to locate package unrar
E: Unable to locate package zip
E: Unable to locate package unzip
E: Unable to locate package sharutils
E: Unable to locate package rar
E: Unable to locate package uudeview
E: Unable to locate package mpack
E: Unable to locate package arj
E: Unable to locate package cabextract
E: Unable to locate package file-roller
The WORKDIR command is used to define the working directory of a Docker container at any given time. The command is specified in the Dockerfile. Any RUN , CMD , ADD , COPY , or ENTRYPOINT command will be executed in the specified working directory.
Tried with this Dockerfile (your Dockerfile without what I told you in my previous comment):
FROM ubuntu:15.10
RUN  apt-get update -y && \
     apt-get upgrade -y && \
     apt-get dist-upgrade -y && \
     apt-get -y autoremove && \
     apt-get clean
RUN apt-get install -y p7zip \
    p7zip-full \
    unace \
    zip \
    unzip \
    xz-utils \
    sharutils \
    uudeview \
    mpack \
    arj \
    cabextract \
    file-roller \
    && rm -rf /var/lib/apt/lists/*
CMD ["bash"]
It works and it installs zip and p7zip
$ docker build -t mytest .
$ docker run -d -ti --name mytest mytest /bin/bash
$ docker exec -ti mytest /bin/bash
 root@f01fc3456a2a:/# zip 
 root@f01fc3456a2a:/# p7zip
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With