Why are un-requested packages removed (docker build)?How is Docker different from a virtual machine?Should I use Vagrant or Docker for creating an isolated environment?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersHow does one remove an image in Docker?How to deal with persistent storage (e.g. databases) in DockerCopying files from Docker container to hostCopying files from host to Docker containerHow to remove old and unused Docker images

Is the internet in Madagascar faster than in UK?

Is there a way to tell what frequency I need a PWM to be?

Is allowing Barbarian features to work with Dex-based attacks imbalancing?

Is this position a forced win for Black after move 14?

Term used to describe a person who predicts future outcomes

Does the Tribal card type have inherent mechanical implications?

Coupling two 15 Amp circuit breaker for 20 Amp

SQL Server - How to achieve READCOMMITED and NOLOCK at the same time?

Are there any to-scale diagrams of the TRAPPIST-1 system?

Normalized Malbolge to Malbolge translator

Why is the Grievance Studies affair considered to be research requiring IRB approval?

What to do about my 1-month-old boy peeing through diapers?

Are sweatpants frowned upon on flights?

web scraping images

STM32 cannot reach individual registers and pins as PIC

What should be done with the carbon when using magic to get oxygen from carbon dioxide?

Is the Amazon rainforest the "world's lungs"?

If the UK Gov. has authority to cancel article 50 notification, why do they have to agree an extension with the EU

Cutting numbers into a specific decimals

Stolen MacBook should I worry about my data?

Why does AM radio react to IR remote?

Should I use the words "pyromancy" and "necromancy" even if they don't mean what people think they do?

Why didn't Doc believe Marty was from the future?

In Endgame, wouldn't Stark have remembered Hulk busting out of the stairwell?



Why are un-requested packages removed (docker build)?


How is Docker different from a virtual machine?Should I use Vagrant or Docker for creating an isolated environment?How to list containers in DockerHow to get a Docker container's IP address from the host?How to remove old Docker containersHow does one remove an image in Docker?How to deal with persistent storage (e.g. databases) in DockerCopying files from Docker container to hostCopying files from host to Docker containerHow to remove old and unused Docker images






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















So, I'm building my docker with the following Dockerfile



# dummy base, which contains R
ARG MY_BASE_IMAGE=r-base
FROM $MY_BASE_IMAGE

ARG KING_URL="http://people.virginia.edu/~wc9c/KING/executables/Linux-king215.tar.gz"
ARG PLINK2_URL="https://github.com/chrchang/plink-ng/releases/download/2019/plink2_linux_x86_64_20190107.zip"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qqy update --fix-missing &&
apt-get -qqy dist-upgrade &&
apt-get -qqy install --no-install-recommends
wget unzip &&
cd /tmp &&
wget -q $KING_URL &&
tar -xzf Linux-king215.tar.gz -C /usr/local/bin &&
wget -q $PLINK2_URL &&
unzip plink2_linux_x86_64_20190107.zip -d /usr/local/bin &&
cd -- &&
apt-get -qqy remove wget unzip &&
rm -rf /tmp/*
/var/tmp/*
/var/cache/apt/*
/var/lib/apt/lists/*
/usr/share/man/??
/usr/share/man/??_*


However, this seems to remove R, unless I explicitly remove the line apt-get -qqy remove wget unzip.



I'm having difficulty understanding why. Help much appreciated!




UPDATE



I've dug deeper, and fount that if I run apt-get -qqy remove wget, things go OK.



BUT! If I apt-get -qqy remove unzip, back to the old weird behavior of the following:



Removing littler (0.3.7-2) ...
Removing r-base (3.5.3-1) ...
Removing r-recommended (3.5.3-1) ...
Removing r-cran-mgcv (1.8-28-1) ...
Removing r-base-dev (3.5.3-1) ...
Removing r-cran-littler (0.3.7-2) ...
Removing r-cran-boot (1.3-20-2) ...
Removing r-cran-class (7.3-15-1) ...
Removing r-cran-cluster (2.0.7-1-1+b3) ...
Removing r-cran-codetools (0.2-16-1) ...
Removing r-cran-foreign (0.8.71-1) ...
Removing r-cran-kernsmooth (2.23-15-3+b4) ...
Removing r-cran-nlme (3.1.137-1+b3) ...
Removing r-cran-mass (7.3-51.1-1) ...
Removing r-cran-nnet (7.3-12-2+b2) ...
Removing r-cran-rpart (4.1-13-1+b1) ...
Removing r-cran-spatial (7.3-11-2+b2) ...
Removing r-cran-survival (2.43-3-1) ...
Removing r-cran-matrix (1.2-17-1) ...
Removing r-cran-lattice (0.20-38-1) ...
Removing r-base-core (3.5.3-1) ...
Removing unzip (6.0-22) ...









share|improve this question


























  • What do you mean by remove R ?

    – Corey
    Mar 28 at 1:03






  • 1





    Sorry for the confusion. I meant R seems to be uninstalled by the ‘remove’ command, even though I did not ask for that.

    – CloudyTrees
    Mar 28 at 4:08






  • 1





    It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. That is how package managers usually work.

    – larsks
    Mar 28 at 15:09












  • That's right @larsks! I was just about to report back on this. Do you mind writing a formal answer? Honestly I was surprised R depends on unzip.

    – CloudyTrees
    Mar 28 at 16:57

















0















So, I'm building my docker with the following Dockerfile



# dummy base, which contains R
ARG MY_BASE_IMAGE=r-base
FROM $MY_BASE_IMAGE

ARG KING_URL="http://people.virginia.edu/~wc9c/KING/executables/Linux-king215.tar.gz"
ARG PLINK2_URL="https://github.com/chrchang/plink-ng/releases/download/2019/plink2_linux_x86_64_20190107.zip"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qqy update --fix-missing &&
apt-get -qqy dist-upgrade &&
apt-get -qqy install --no-install-recommends
wget unzip &&
cd /tmp &&
wget -q $KING_URL &&
tar -xzf Linux-king215.tar.gz -C /usr/local/bin &&
wget -q $PLINK2_URL &&
unzip plink2_linux_x86_64_20190107.zip -d /usr/local/bin &&
cd -- &&
apt-get -qqy remove wget unzip &&
rm -rf /tmp/*
/var/tmp/*
/var/cache/apt/*
/var/lib/apt/lists/*
/usr/share/man/??
/usr/share/man/??_*


However, this seems to remove R, unless I explicitly remove the line apt-get -qqy remove wget unzip.



I'm having difficulty understanding why. Help much appreciated!




UPDATE



I've dug deeper, and fount that if I run apt-get -qqy remove wget, things go OK.



BUT! If I apt-get -qqy remove unzip, back to the old weird behavior of the following:



Removing littler (0.3.7-2) ...
Removing r-base (3.5.3-1) ...
Removing r-recommended (3.5.3-1) ...
Removing r-cran-mgcv (1.8-28-1) ...
Removing r-base-dev (3.5.3-1) ...
Removing r-cran-littler (0.3.7-2) ...
Removing r-cran-boot (1.3-20-2) ...
Removing r-cran-class (7.3-15-1) ...
Removing r-cran-cluster (2.0.7-1-1+b3) ...
Removing r-cran-codetools (0.2-16-1) ...
Removing r-cran-foreign (0.8.71-1) ...
Removing r-cran-kernsmooth (2.23-15-3+b4) ...
Removing r-cran-nlme (3.1.137-1+b3) ...
Removing r-cran-mass (7.3-51.1-1) ...
Removing r-cran-nnet (7.3-12-2+b2) ...
Removing r-cran-rpart (4.1-13-1+b1) ...
Removing r-cran-spatial (7.3-11-2+b2) ...
Removing r-cran-survival (2.43-3-1) ...
Removing r-cran-matrix (1.2-17-1) ...
Removing r-cran-lattice (0.20-38-1) ...
Removing r-base-core (3.5.3-1) ...
Removing unzip (6.0-22) ...









share|improve this question


























  • What do you mean by remove R ?

    – Corey
    Mar 28 at 1:03






  • 1





    Sorry for the confusion. I meant R seems to be uninstalled by the ‘remove’ command, even though I did not ask for that.

    – CloudyTrees
    Mar 28 at 4:08






  • 1





    It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. That is how package managers usually work.

    – larsks
    Mar 28 at 15:09












  • That's right @larsks! I was just about to report back on this. Do you mind writing a formal answer? Honestly I was surprised R depends on unzip.

    – CloudyTrees
    Mar 28 at 16:57













0












0








0








So, I'm building my docker with the following Dockerfile



# dummy base, which contains R
ARG MY_BASE_IMAGE=r-base
FROM $MY_BASE_IMAGE

ARG KING_URL="http://people.virginia.edu/~wc9c/KING/executables/Linux-king215.tar.gz"
ARG PLINK2_URL="https://github.com/chrchang/plink-ng/releases/download/2019/plink2_linux_x86_64_20190107.zip"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qqy update --fix-missing &&
apt-get -qqy dist-upgrade &&
apt-get -qqy install --no-install-recommends
wget unzip &&
cd /tmp &&
wget -q $KING_URL &&
tar -xzf Linux-king215.tar.gz -C /usr/local/bin &&
wget -q $PLINK2_URL &&
unzip plink2_linux_x86_64_20190107.zip -d /usr/local/bin &&
cd -- &&
apt-get -qqy remove wget unzip &&
rm -rf /tmp/*
/var/tmp/*
/var/cache/apt/*
/var/lib/apt/lists/*
/usr/share/man/??
/usr/share/man/??_*


However, this seems to remove R, unless I explicitly remove the line apt-get -qqy remove wget unzip.



I'm having difficulty understanding why. Help much appreciated!




UPDATE



I've dug deeper, and fount that if I run apt-get -qqy remove wget, things go OK.



BUT! If I apt-get -qqy remove unzip, back to the old weird behavior of the following:



Removing littler (0.3.7-2) ...
Removing r-base (3.5.3-1) ...
Removing r-recommended (3.5.3-1) ...
Removing r-cran-mgcv (1.8-28-1) ...
Removing r-base-dev (3.5.3-1) ...
Removing r-cran-littler (0.3.7-2) ...
Removing r-cran-boot (1.3-20-2) ...
Removing r-cran-class (7.3-15-1) ...
Removing r-cran-cluster (2.0.7-1-1+b3) ...
Removing r-cran-codetools (0.2-16-1) ...
Removing r-cran-foreign (0.8.71-1) ...
Removing r-cran-kernsmooth (2.23-15-3+b4) ...
Removing r-cran-nlme (3.1.137-1+b3) ...
Removing r-cran-mass (7.3-51.1-1) ...
Removing r-cran-nnet (7.3-12-2+b2) ...
Removing r-cran-rpart (4.1-13-1+b1) ...
Removing r-cran-spatial (7.3-11-2+b2) ...
Removing r-cran-survival (2.43-3-1) ...
Removing r-cran-matrix (1.2-17-1) ...
Removing r-cran-lattice (0.20-38-1) ...
Removing r-base-core (3.5.3-1) ...
Removing unzip (6.0-22) ...









share|improve this question
















So, I'm building my docker with the following Dockerfile



# dummy base, which contains R
ARG MY_BASE_IMAGE=r-base
FROM $MY_BASE_IMAGE

ARG KING_URL="http://people.virginia.edu/~wc9c/KING/executables/Linux-king215.tar.gz"
ARG PLINK2_URL="https://github.com/chrchang/plink-ng/releases/download/2019/plink2_linux_x86_64_20190107.zip"
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get -qqy update --fix-missing &&
apt-get -qqy dist-upgrade &&
apt-get -qqy install --no-install-recommends
wget unzip &&
cd /tmp &&
wget -q $KING_URL &&
tar -xzf Linux-king215.tar.gz -C /usr/local/bin &&
wget -q $PLINK2_URL &&
unzip plink2_linux_x86_64_20190107.zip -d /usr/local/bin &&
cd -- &&
apt-get -qqy remove wget unzip &&
rm -rf /tmp/*
/var/tmp/*
/var/cache/apt/*
/var/lib/apt/lists/*
/usr/share/man/??
/usr/share/man/??_*


However, this seems to remove R, unless I explicitly remove the line apt-get -qqy remove wget unzip.



I'm having difficulty understanding why. Help much appreciated!




UPDATE



I've dug deeper, and fount that if I run apt-get -qqy remove wget, things go OK.



BUT! If I apt-get -qqy remove unzip, back to the old weird behavior of the following:



Removing littler (0.3.7-2) ...
Removing r-base (3.5.3-1) ...
Removing r-recommended (3.5.3-1) ...
Removing r-cran-mgcv (1.8-28-1) ...
Removing r-base-dev (3.5.3-1) ...
Removing r-cran-littler (0.3.7-2) ...
Removing r-cran-boot (1.3-20-2) ...
Removing r-cran-class (7.3-15-1) ...
Removing r-cran-cluster (2.0.7-1-1+b3) ...
Removing r-cran-codetools (0.2-16-1) ...
Removing r-cran-foreign (0.8.71-1) ...
Removing r-cran-kernsmooth (2.23-15-3+b4) ...
Removing r-cran-nlme (3.1.137-1+b3) ...
Removing r-cran-mass (7.3-51.1-1) ...
Removing r-cran-nnet (7.3-12-2+b2) ...
Removing r-cran-rpart (4.1-13-1+b1) ...
Removing r-cran-spatial (7.3-11-2+b2) ...
Removing r-cran-survival (2.43-3-1) ...
Removing r-cran-matrix (1.2-17-1) ...
Removing r-cran-lattice (0.20-38-1) ...
Removing r-base-core (3.5.3-1) ...
Removing unzip (6.0-22) ...






docker






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 28 at 14:30







CloudyTrees

















asked Mar 27 at 21:24









CloudyTreesCloudyTrees

1991 gold badge5 silver badges15 bronze badges




1991 gold badge5 silver badges15 bronze badges















  • What do you mean by remove R ?

    – Corey
    Mar 28 at 1:03






  • 1





    Sorry for the confusion. I meant R seems to be uninstalled by the ‘remove’ command, even though I did not ask for that.

    – CloudyTrees
    Mar 28 at 4:08






  • 1





    It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. That is how package managers usually work.

    – larsks
    Mar 28 at 15:09












  • That's right @larsks! I was just about to report back on this. Do you mind writing a formal answer? Honestly I was surprised R depends on unzip.

    – CloudyTrees
    Mar 28 at 16:57

















  • What do you mean by remove R ?

    – Corey
    Mar 28 at 1:03






  • 1





    Sorry for the confusion. I meant R seems to be uninstalled by the ‘remove’ command, even though I did not ask for that.

    – CloudyTrees
    Mar 28 at 4:08






  • 1





    It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. That is how package managers usually work.

    – larsks
    Mar 28 at 15:09












  • That's right @larsks! I was just about to report back on this. Do you mind writing a formal answer? Honestly I was surprised R depends on unzip.

    – CloudyTrees
    Mar 28 at 16:57
















What do you mean by remove R ?

– Corey
Mar 28 at 1:03





What do you mean by remove R ?

– Corey
Mar 28 at 1:03




1




1





Sorry for the confusion. I meant R seems to be uninstalled by the ‘remove’ command, even though I did not ask for that.

– CloudyTrees
Mar 28 at 4:08





Sorry for the confusion. I meant R seems to be uninstalled by the ‘remove’ command, even though I did not ask for that.

– CloudyTrees
Mar 28 at 4:08




1




1





It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. That is how package managers usually work.

– larsks
Mar 28 at 15:09






It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. That is how package managers usually work.

– larsks
Mar 28 at 15:09














That's right @larsks! I was just about to report back on this. Do you mind writing a formal answer? Honestly I was surprised R depends on unzip.

– CloudyTrees
Mar 28 at 16:57





That's right @larsks! I was just about to report back on this. Do you mind writing a formal answer? Honestly I was surprised R depends on unzip.

– CloudyTrees
Mar 28 at 16:57












1 Answer
1






active

oldest

votes


















1















It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. This is typical behavior for a package manager.



You can see the dependency tree for a package with the apt-cache dotty command, which will output the dependencies in dot format. Running apt-cache dotty r-base shows:



r-base -> r-base-core
r-base-core -> unzip





share|improve this answer
























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55386670%2fwhy-are-un-requested-packages-removed-docker-build%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1















    It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. This is typical behavior for a package manager.



    You can see the dependency tree for a package with the apt-cache dotty command, which will output the dependencies in dot format. Running apt-cache dotty r-base shows:



    r-base -> r-base-core
    r-base-core -> unzip





    share|improve this answer





























      1















      It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. This is typical behavior for a package manager.



      You can see the dependency tree for a package with the apt-cache dotty command, which will output the dependencies in dot format. Running apt-cache dotty r-base shows:



      r-base -> r-base-core
      r-base-core -> unzip





      share|improve this answer



























        1














        1










        1









        It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. This is typical behavior for a package manager.



        You can see the dependency tree for a package with the apt-cache dotty command, which will output the dependencies in dot format. Running apt-cache dotty r-base shows:



        r-base -> r-base-core
        r-base-core -> unzip





        share|improve this answer













        It sounds as if unzip is a dependency of the R package. Since you are asking apt to remove unzip, it will also need to remove anything that depends on unzip. This is typical behavior for a package manager.



        You can see the dependency tree for a package with the apt-cache dotty command, which will output the dependencies in dot format. Running apt-cache dotty r-base shows:



        r-base -> r-base-core
        r-base-core -> unzip






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 28 at 18:03









        larskslarsks

        134k23 gold badges220 silver badges221 bronze badges




        134k23 gold badges220 silver badges221 bronze badges





















            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.







            Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.



















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55386670%2fwhy-are-un-requested-packages-removed-docker-build%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

            Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

            Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript