Why docker layer is not cached?How to control web page caching, across all browsers?Disabling Chrome cache for website developmentIs Safari on iOS 6 caching $.ajax results?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 containersCopying files from Docker container to hostCopying files from host to Docker container

Is exact Kanji stroke length important?

How do ultrasonic sensors differentiate between transmitted and received signals?

In Star Trek IV, why did the Bounty go back to a time when whales were already rare?

Freedom of speech and where it applies

Reply ‘no position’ while the job posting is still there (‘HiWi’ position in Germany)

Giant Toughroad SLR 2 for 200 miles in two days, will it make it?

Can a Bard use an arcane focus?

Identify a stage play about a VR experience in which participants are encouraged to simulate performing horrific activities

How to prevent YouTube from showing already watched videos?

Bob has never been a M before

A known event to a history junkie

My boss asked me to take a one-day class, then signs it up as a day off

Is it possible to build a CPA Secure encryption scheme which remains secure even when the encryption of secret key is given?

Why isn't KTEX's runway designation 10/28 instead of 9/27?

Should my PhD thesis be submitted under my legal name?

What (else) happened July 1st 1858 in London?

What was required to accept "troll"?

Installing PowerShell on 32-bit Kali OS fails

Is there enough fresh water in the world to eradicate the drinking water crisis?

Can a controlled ghast be a leader of a pack of ghouls?

What to do when my ideas aren't chosen, when I strongly disagree with the chosen solution?

Is there a good way to store credentials outside of a password manager?

How to deal with or prevent idle in the test team?

Organic chemistry Iodoform Reaction



Why docker layer is not cached?


How to control web page caching, across all browsers?Disabling Chrome cache for website developmentIs Safari on iOS 6 caching $.ajax results?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 containersCopying files from Docker container to hostCopying files from host to Docker container













2















I have Dockerfile which have next command:



RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION


Here layers start to rebuild:



Step 12/27 : RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrcnfin" >> /root/.bash_profile
---> Using cache
---> b18437df38fb
Step 13/27 : RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
---> Running in 3b76e5d4ae0a

Fetching perl 5.24.1 as /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Download http://www.cpan.org/authors/id/S/SH/SHAY/perl-5.24.1.tar.bz2 to /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Installing /opt/perlbrew/build/perl-5.24.1/perl-5.24.1 into /opt/perlbrew/perls/perl-5.24.1


Why cached layer is not used for this command?



UPD

The docker file:



FROM centos:latest

ARG PERLBREW_ROOT=/opt/perlbrew
ARG PERL_VERSION=5.24.1
ARG MONKEYMAN_DIR=/opt/monkeyman

RUN yum -y install yum-plugin-ovl
RUN yum -y upgrade
RUN yum -y install perl
RUN yum-builddep -y perl
RUN yum install -y bzip2 zip which
RUN yum groupinstall -y 'Development Tools'
RUN curl -L https://install.perlbrew.pl | bash
RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrc
nfin" >> /root/.bash_profile
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew switch $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install-cpanm
RUN source $PERLBREW_ROOT/etc/bashrc && cpanm Carton


no arguments provided when build



UPD



$ docker --version
Docker version 1.13.1, build 07f3374/1.13.1









share|improve this question



















  • 1





    How is $PERLBREW_ROOT defined? Could you provide an example that allows to reproduce the behavior?

    – Behe
    Mar 6 at 9:07











  • Something before this line has probably changed.

    – David Maze
    Mar 6 at 10:39











  • @DavidMaze: no, step 12 uses cache. See updated question

    – Eugen Konkov
    Mar 6 at 11:10






  • 1





    @Behe: Example provided. See updated question

    – Eugen Konkov
    Mar 6 at 11:13











  • Can you include the output of two build commands run consecutively on the same host?

    – BMitch
    Mar 6 at 13:21















2















I have Dockerfile which have next command:



RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION


Here layers start to rebuild:



Step 12/27 : RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrcnfin" >> /root/.bash_profile
---> Using cache
---> b18437df38fb
Step 13/27 : RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
---> Running in 3b76e5d4ae0a

Fetching perl 5.24.1 as /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Download http://www.cpan.org/authors/id/S/SH/SHAY/perl-5.24.1.tar.bz2 to /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Installing /opt/perlbrew/build/perl-5.24.1/perl-5.24.1 into /opt/perlbrew/perls/perl-5.24.1


Why cached layer is not used for this command?



UPD

The docker file:



FROM centos:latest

ARG PERLBREW_ROOT=/opt/perlbrew
ARG PERL_VERSION=5.24.1
ARG MONKEYMAN_DIR=/opt/monkeyman

RUN yum -y install yum-plugin-ovl
RUN yum -y upgrade
RUN yum -y install perl
RUN yum-builddep -y perl
RUN yum install -y bzip2 zip which
RUN yum groupinstall -y 'Development Tools'
RUN curl -L https://install.perlbrew.pl | bash
RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrc
nfin" >> /root/.bash_profile
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew switch $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install-cpanm
RUN source $PERLBREW_ROOT/etc/bashrc && cpanm Carton


no arguments provided when build



UPD



$ docker --version
Docker version 1.13.1, build 07f3374/1.13.1









share|improve this question



















  • 1





    How is $PERLBREW_ROOT defined? Could you provide an example that allows to reproduce the behavior?

    – Behe
    Mar 6 at 9:07











  • Something before this line has probably changed.

    – David Maze
    Mar 6 at 10:39











  • @DavidMaze: no, step 12 uses cache. See updated question

    – Eugen Konkov
    Mar 6 at 11:10






  • 1





    @Behe: Example provided. See updated question

    – Eugen Konkov
    Mar 6 at 11:13











  • Can you include the output of two build commands run consecutively on the same host?

    – BMitch
    Mar 6 at 13:21













2












2








2








I have Dockerfile which have next command:



RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION


Here layers start to rebuild:



Step 12/27 : RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrcnfin" >> /root/.bash_profile
---> Using cache
---> b18437df38fb
Step 13/27 : RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
---> Running in 3b76e5d4ae0a

Fetching perl 5.24.1 as /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Download http://www.cpan.org/authors/id/S/SH/SHAY/perl-5.24.1.tar.bz2 to /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Installing /opt/perlbrew/build/perl-5.24.1/perl-5.24.1 into /opt/perlbrew/perls/perl-5.24.1


Why cached layer is not used for this command?



UPD

The docker file:



FROM centos:latest

ARG PERLBREW_ROOT=/opt/perlbrew
ARG PERL_VERSION=5.24.1
ARG MONKEYMAN_DIR=/opt/monkeyman

RUN yum -y install yum-plugin-ovl
RUN yum -y upgrade
RUN yum -y install perl
RUN yum-builddep -y perl
RUN yum install -y bzip2 zip which
RUN yum groupinstall -y 'Development Tools'
RUN curl -L https://install.perlbrew.pl | bash
RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrc
nfin" >> /root/.bash_profile
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew switch $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install-cpanm
RUN source $PERLBREW_ROOT/etc/bashrc && cpanm Carton


no arguments provided when build



UPD



$ docker --version
Docker version 1.13.1, build 07f3374/1.13.1









share|improve this question
















I have Dockerfile which have next command:



RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION


Here layers start to rebuild:



Step 12/27 : RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrcnfin" >> /root/.bash_profile
---> Using cache
---> b18437df38fb
Step 13/27 : RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
---> Running in 3b76e5d4ae0a

Fetching perl 5.24.1 as /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Download http://www.cpan.org/authors/id/S/SH/SHAY/perl-5.24.1.tar.bz2 to /opt/perlbrew/dists/perl-5.24.1.tar.bz2
Installing /opt/perlbrew/build/perl-5.24.1/perl-5.24.1 into /opt/perlbrew/perls/perl-5.24.1


Why cached layer is not used for this command?



UPD

The docker file:



FROM centos:latest

ARG PERLBREW_ROOT=/opt/perlbrew
ARG PERL_VERSION=5.24.1
ARG MONKEYMAN_DIR=/opt/monkeyman

RUN yum -y install yum-plugin-ovl
RUN yum -y upgrade
RUN yum -y install perl
RUN yum-builddep -y perl
RUN yum install -y bzip2 zip which
RUN yum groupinstall -y 'Development Tools'
RUN curl -L https://install.perlbrew.pl | bash
RUN echo -e "nif [ -f /opt/perlbrew/etc/bashrc ]; thenntsource /opt/perlbrew/etc/bashrc
nfin" >> /root/.bash_profile
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew switch $PERL_VERSION
RUN source $PERLBREW_ROOT/etc/bashrc && perlbrew install-cpanm
RUN source $PERLBREW_ROOT/etc/bashrc && cpanm Carton


no arguments provided when build



UPD



$ docker --version
Docker version 1.13.1, build 07f3374/1.13.1






docker caching






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 7 at 9:51







Eugen Konkov

















asked Mar 6 at 7:25









Eugen KonkovEugen Konkov

6,38934166




6,38934166







  • 1





    How is $PERLBREW_ROOT defined? Could you provide an example that allows to reproduce the behavior?

    – Behe
    Mar 6 at 9:07











  • Something before this line has probably changed.

    – David Maze
    Mar 6 at 10:39











  • @DavidMaze: no, step 12 uses cache. See updated question

    – Eugen Konkov
    Mar 6 at 11:10






  • 1





    @Behe: Example provided. See updated question

    – Eugen Konkov
    Mar 6 at 11:13











  • Can you include the output of two build commands run consecutively on the same host?

    – BMitch
    Mar 6 at 13:21












  • 1





    How is $PERLBREW_ROOT defined? Could you provide an example that allows to reproduce the behavior?

    – Behe
    Mar 6 at 9:07











  • Something before this line has probably changed.

    – David Maze
    Mar 6 at 10:39











  • @DavidMaze: no, step 12 uses cache. See updated question

    – Eugen Konkov
    Mar 6 at 11:10






  • 1





    @Behe: Example provided. See updated question

    – Eugen Konkov
    Mar 6 at 11:13











  • Can you include the output of two build commands run consecutively on the same host?

    – BMitch
    Mar 6 at 13:21







1




1





How is $PERLBREW_ROOT defined? Could you provide an example that allows to reproduce the behavior?

– Behe
Mar 6 at 9:07





How is $PERLBREW_ROOT defined? Could you provide an example that allows to reproduce the behavior?

– Behe
Mar 6 at 9:07













Something before this line has probably changed.

– David Maze
Mar 6 at 10:39





Something before this line has probably changed.

– David Maze
Mar 6 at 10:39













@DavidMaze: no, step 12 uses cache. See updated question

– Eugen Konkov
Mar 6 at 11:10





@DavidMaze: no, step 12 uses cache. See updated question

– Eugen Konkov
Mar 6 at 11:10




1




1





@Behe: Example provided. See updated question

– Eugen Konkov
Mar 6 at 11:13





@Behe: Example provided. See updated question

– Eugen Konkov
Mar 6 at 11:13













Can you include the output of two build commands run consecutively on the same host?

– BMitch
Mar 6 at 13:21





Can you include the output of two build commands run consecutively on the same host?

– BMitch
Mar 6 at 13:21












0






active

oldest

votes











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%2f55017701%2fwhy-docker-layer-is-not-cached%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















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%2f55017701%2fwhy-docker-layer-is-not-cached%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

AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

Алба-Юлія

Захаров Федір Захарович