Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble getting caching to work #410

Closed
stepchowfun opened this issue Oct 25, 2018 · 15 comments · Fixed by #441
Closed

Trouble getting caching to work #410

stepchowfun opened this issue Oct 25, 2018 · 15 comments · Fixed by #441
Labels
kind/bug Something isn't working

Comments

@stepchowfun
Copy link

Actual behavior

Hello! We're running into a problem where Kaniko can push to our AWS ECR repo, but it reports an authorization error when attempting to use it as a cache. The following transcript demonstrates the issue:

$ mkdir context
$ echo "FROM redacted.amazonaws.com/jorb:trusty-v11" > context/Dockerfile
$ echo "{\"credHelpers\": { \"redacted.amazonaws.com\": \"ecr-login\"}}" > config.json

$ docker run \
>   -v "${PWD}/config.json":/kaniko/.docker/config.json:ro \
>   -v "${PWD}/context":/workspace:ro \
>   gcr.io/kaniko-project/executor:latest \
>   --context /workspace \
>   --dockerfile Dockerfile \
>   --destination redacted.amazonaws.com/jorb/cache:trusty-v11 \
>   --cache true \
>   --cache-repo redacted.amazonaws.com/jorb/cache
WARN[0000] Error while retrieving image from cache: unsupported status code 401; body: Not Authorized

INFO[0000] Downloading base image redacted.amazonaws.com/jorb:trusty-v11
INFO[0000] Extracting layer 0
INFO[0003] Extracting layer 1
INFO[0004] Extracting layer 2
INFO[0004] Extracting layer 3
INFO[0004] Extracting layer 4
INFO[0004] Extracting layer 5
INFO[0005] Extracting layer 6
INFO[0005] Extracting layer 7
INFO[0005] Extracting layer 8
INFO[0006] Extracting layer 9
INFO[0007] Extracting layer 10
INFO[0007] Extracting layer 11
INFO[0007] Extracting layer 12
INFO[0007] Taking snapshot of full filesystem...
2018/10/25 18:46:56 pushed blob sha256:5d7664d63832d5cb10465ec41d8f179020768a2df761ca70fb6773bf2cff0a63
2018/10/25 18:46:56 pushed blob sha256:8869e3292613da11e85476de60d76f79dd73b78f43a48c5044a44dc77476d95b
2018/10/25 18:46:56 pushed blob sha256:3bb895a3487dbb281df67c697c33233d183d74260eb3b95694b96c52532fb493
2018/10/25 18:46:56 pushed blob sha256:7ebc4f0b1cc63fd679d0b3c8c5d360411aff0c72b386a61de2fab0a621e7d149
2018/10/25 18:46:56 pushed blob sha256:cb4080f40e741854e34ae741fdc6b682158e549d85e622f69bccf0ad51a5403e
2018/10/25 18:46:56 pushed blob sha256:d9b6054fade67b994b0912188e77c3940c567aa4fe9aae7394b1914b57eef42f
2018/10/25 18:46:56 pushed blob sha256:26925a969bc7e6f7a915bdf848dfbc50e340ed2a99322564db3bc91f2cd88be4
2018/10/25 18:46:56 pushed blob sha256:3812bf3f44df591eaca5dca1b7d139c60b52a6597a27206be0f0816946f555dd
2018/10/25 18:46:56 pushed blob sha256:4d17f384d66ae03986992c1bb7cdd23a35d9cc2d4967867f12de65a04632e0e9
2018/10/25 18:46:57 pushed blob sha256:0fb32252a2c5cf45757fbde81c1b499dcb9a4558af2d68e9d0f485483fc2e066
2018/10/25 18:46:59 pushed blob sha256:0bb5e249cbc8a2f973f9340a6a7d7853891af85374f9e79578c911ec44c3cf4e
2018/10/25 18:46:59 pushed blob sha256:c1357339201c1a7d05dcded6b9052964f8ea9487c4330a61c51ab69f2f43676d
2018/10/25 18:47:01 pushed blob sha256:4ddcfaa5aa09d2976307e71c2e3dcb6defd93496c98fe69a94e97ddc18a5e69a
2018/10/25 18:47:05 pushed blob sha256:fbf820126084cb640febf6ca6addbb59a092696692ef7d941abc66bc0aa876f6
2018/10/25 18:47:05 redacted.amazonaws.com/jorb/cache:trusty-v11: digest: sha256:18e13835029bab8955b484e52b1670968c5e6fc628994033db1f4a7cfb7e3420 size: 2372

Expected behavior

It seems clear that Kaniko has access to the repo/registry since it successfully pushed the final image there. So the question we're hoping to solve is why authentication fails for the same repo/registry during the caching read in the beginning.

To Reproduce

The transcript above shows the commands we ran to demonstrate the problem.

Additional Information

The Dockerfile is shown above and is the only file in the context.

cc my teammates @juliahw @charignon

@priyawadhwa
Copy link
Collaborator

Hey @stepchowfun, so kaniko supports caching at two levels right now:

  1. We cache individual layers constructed from RUN commands in a remote repository (specified by --cache-repo)
  2. We can access cached base images as tarballs in a local directory accessible to the executor (specified by the --cache-dir command).

Before downloading the base image, kaniko checks the local directory specified by the --cache-dir command (which defaults to /cache) for a tarball of the base image. In this case, it didn't find anything, so it spits out a warning and then proceeds to download the base image and continue the build. If you want to take advantage of the caching for base images, you'll need to populate a directory with those images yourself and make sure kaniko can access it.

If you only need layer caching (for RUN commands), then kaniko will populate the remote cache itself (again, which is specified by the --cache-repo flag).

@sharifelgamal could you please explain the easiest way to populate the base image cache?

@juliahw
Copy link

juliahw commented Oct 26, 2018

@priyawadhwa Thanks for your reply. I modified the above docker run command to mount another directory to /cache, and I still experience the same error:

$ docker run \
    -v "${PWD}/config.json":/kaniko/.docker/config.json:ro \
    -v "${PWD}/context":/workspace:ro \
    -v "${PWD}/cache":/cache \
    gcr.io/kaniko-project/executor:latest \
    --context /workspace \
    --dockerfile Dockerfile \
    --destination redacted.amazonaws.com/jorb/cache:trusty-v11 \
    --cache true \
    --cache-dir /cache \
    --cache-repo redacted.amazonaws.com/jorb/cache

WARN[0000] Error while retrieving image from cache: unsupported status code 401; body: Not Authorized

INFO[0000] Downloading base image redacted.amazonaws.com/jorb:trusty-v11
INFO[0000] Extracting layer 0
INFO[0003] Extracting layer 1
INFO[0003] Extracting layer 2
...

In addition, a missing local cache directory should not fail with a 401 HTTP status code. I suspect there's something else amiss. Can you help us debug the issue?

@priyawadhwa
Copy link
Collaborator

I modified the above docker run command to mount another directory to /cache

I think kaniko expects the tarball of the base image to live at the path cache-dir-repo/image-digest, so in this case it's looking at /cache/<your image digest> and not finding anything. If you mount in the tarball at that path, this should work (I think that's correct, but @sharifelgamal can confirm)

a missing local cache directory should not fail with a 401 HTTP status code

Since kaniko needs the image digest to determine the path to the base image, it's making a request to figure that out. It tries to get information about the image but returns with a Not Authorized error.

It seems like different auth may be passed in when trying to get the digest vs when trying to download the full image (since downloading the full image seems to be working, we should default to that in both scenarios). I can open a PR for this.

priyawadhwa pushed a commit to priyawadhwa/kaniko that referenced this issue Oct 26, 2018
Issue GoogleContainerTools#410 experienced an error with base image caching where they were
"Not Authorized" to get information for a remote image, but later were
able to download and extract the base image.

To fix this, we can switch to using the remoteImage function for getting
information about the digest, which is the same function used for
downloading base images. This way we can also take advantage of the
--insecure and --skip-tls-verify flags if users pass those in when
trying to get digests for the cache as well.
@juliahw
Copy link

juliahw commented Oct 26, 2018

I see, thanks for clarifying! For posterity, it would be great if Kaniko could log some more information about the location from which it's trying to fetch the cache.

@priyawadhwa
Copy link
Collaborator

Totally agree, and we also have an issue open to add some clearer documentation in #411

Thanks for your patience!

@priyawadhwa
Copy link
Collaborator

We just merged #413, so the :latest version of the kaniko image should fix the warning you were seeing.

@priyawadhwa priyawadhwa added the kind/bug Something isn't working label Oct 29, 2018
@stepchowfun
Copy link
Author

Thanks @priyawadhwa!

@xoen
Copy link

xoen commented Nov 7, 2018

Hello, I've been trying kaniko and managed to make it build a docker image and push to the destination (AWS ECR in our case).

In my case it also pushes to the destination/cache repository, which is great.
The thing is that subsequent builds don't seem to use this remote cache (e.g. it takes the same amount of time to re-build the image).

My expectation would be that the --cache-repo value (whether passed explicitly or inferred from --destination) would be used by kaniko to avoid re-running as many steps as possible.
In our use case download the base image is not where the bulk of the build time is spent, it's the re-run of some RUN commands which is taking ages (and we can't do much about that).

I've tried quite few things but it kaniko seems to re-run all the steps in a Dockerfile ignoring what previously pushed to the /cache repository. I'm passing the --cache flag and I've read the README few times without much luck.

It seems like somehow when re-calculating the hash the value is different from the one in the cache and that causes a miss and therefore a re-run of the step - but I'm not really sure about the kaniko internals.

Any thoughts? I'll try few more things and if I have any news I'll post here.

@priyawadhwa
Copy link
Collaborator

Hey @xoen, you're correct that passing in a value for --cache-repo should populate that cache, and subsequent runs should use the layers within that cache.

It could be that the hash value is being calculated incorrectly, could you provide the Dockerfile you're trying to build?

@xoen
Copy link

xoen commented Nov 7, 2018

Hello @priyawadhwa - that's our guess too but it's not really clear why as the files between two builds don't change. A theory we haven't tested yet is that maybe that WORKDIR step is invalidating all subsequent steps/layers? No idea.

This is the Dockerfile. This is a template application, our users' applications' Dockerfiles will be very very similar but their dependencies (installed using apt-get and packrat) could change and some of them can take quite a long time to download and/or build and/or install.

PS: Thanks for looking into this :)!

@priyawadhwa
Copy link
Collaborator

The good news is that the cache key generation is working. The reason this isn't working is because this Dockerfile is formatted like this:

WORKDIR /some/dir
RUN command one
RUN command two
RUN command three

Right now, we only cache RUN commands, and kaniko will first go through all commands and try to extract as many cached layers as it can before execution. Since WORKDIR isn't cached, kaniko never checks if the subsequent commands are cached.

@dlorenc is this intended behavior? Should we consider caching all commands to fix this, or maybe executing commands and checking the cache until the first cache miss on a RUN command occurs?

@r4vi
Copy link

r4vi commented Nov 8, 2018

@priyawadhwa we moved WORKDIR to the end of the Dockerfile and we still see the same behaviour (I work with @xoen) The thing we find strange is how it looks up in the remote cache for a certain key, doesn't find it, then builds the layer and uploads it with a different cache key. We would expect that if there was a cache miss, it would build and push back to the cache-repo with the key it checked to begin with.

e.g:

INFO[0049] Checking for cached layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:a7a49f96a1c83fcef748b5c8393c6b81d4f80e8e525ba13fcdefae93dd4d44f2... 
INFO[0049] No cached layer found for cmd RUN rm -rf /srv/shiny-server/* 
INFO[0049] RUN rm -rf /srv/shiny-server/*               
INFO[0049] cmd: /bin/sh                                 
INFO[0049] args: [-c rm -rf /srv/shiny-server/*]   

...

INFO[0057] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9f164a5b1eb5d4db6877e0faa1ab25d5973488f6134ccb1fb41b76732f4a9468 to cache now 

Is this expected behaviour? Or is something going wrong? I'm hoping to have some time to run kaniko under a debugger tomorrow

Here is the full build output for 2 runs:

WARN[0000] Error while retrieving image from cache: getting image from path: open /cache/sha256:627a2b7b3b6b1f6e33d37bdba835bbbd854acf70d74010645af71fc3ff6c32b6: no such file or directory 
INFO[0000] Downloading base image rocker/shiny@sha256:627a2b7b3b6b1f6e33d37bdba835bbbd854acf70d74010645af71fc3ff6c32b6 
2018/11/08 10:36:14 No matching credentials were found, falling back on anonymous
INFO[0001] Executing 0 build triggers                   
INFO[0001] Extracting layer 0                           
INFO[0005] Extracting layer 1                           
INFO[0005] Extracting layer 2                           
INFO[0007] Extracting layer 3                           
INFO[0007] Extracting layer 4                           
INFO[0007] Extracting layer 5                           
INFO[0022] Extracting layer 6                           
INFO[0033] Extracting layer 7                           
INFO[0034] Taking snapshot of full filesystem...        
INFO[0049] Checking for cached layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:a7a49f96a1c83fcef748b5c8393c6b81d4f80e8e525ba13fcdefae93dd4d44f2... 
INFO[0049] No cached layer found for cmd RUN rm -rf /srv/shiny-server/* 
INFO[0049] RUN rm -rf /srv/shiny-server/*               
INFO[0049] cmd: /bin/sh                                 
INFO[0049] args: [-c rm -rf /srv/shiny-server/*]        
INFO[0049] Taking snapshot of full filesystem...        
INFO[0050] Adding whiteout for /srv/shiny-server/01_hello 
INFO[0050] Adding whiteout for /srv/shiny-server/09_upload 
INFO[0050] Adding whiteout for /srv/shiny-server/02_text 
INFO[0050] Adding whiteout for /srv/shiny-server/06_tabsets 
INFO[0050] Adding whiteout for /srv/shiny-server/05_sliders 
INFO[0050] Adding whiteout for /srv/shiny-server/index.html 
INFO[0050] Adding whiteout for /srv/shiny-server/07_widgets 
INFO[0050] Adding whiteout for /srv/shiny-server/11_timer 
INFO[0050] Adding whiteout for /srv/shiny-server/04_mpg 
INFO[0050] Adding whiteout for /srv/shiny-server/08_html 
INFO[0050] Adding whiteout for /srv/shiny-server/sample-apps 
INFO[0050] Adding whiteout for /srv/shiny-server/10_download 
INFO[0050] Adding whiteout for /srv/shiny-server/03_reactivity 
INFO[0057] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9f164a5b1eb5d4db6877e0faa1ab25d5973488f6134ccb1fb41b76732f4a9468 to cache now 
2018/11/08 10:37:12 pushed blob sha256:4b68448cdd44caa125c8fc788cef85b3c362787e0a473966f43b2617f89b0211
2018/11/08 10:37:12 pushed blob sha256:564ec00d93b5ff98f02d795a91f3b8ece43a2e39c616a75c5e7a24ea4bf6a682
2018/11/08 10:37:12 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9f164a5b1eb5d4db6877e0faa1ab25d5973488f6134ccb1fb41b76732f4a9468: digest: sha256:8e464dbdb2b017ea86a401a55eb4378b6fc8a1e6548c0d29135fa369df7ed56f size: 425
INFO[0058] RUN mkdir -p /var/log/shiny-server           
INFO[0058] cmd: /bin/sh                                 
INFO[0058] args: [-c mkdir -p /var/log/shiny-server]    
INFO[0058] Taking snapshot of full filesystem...        
INFO[0068] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:8e8347c09f41b43860c8498c15a01a2ba2c92395cf1dab40196d3d8c46a9ef91 to cache now 
2018/11/08 10:37:22 pushed blob sha256:0ee66d141cf9b208e14744dce21d05ecd86b7bb5a1de30ca776dfefe3fffdcd4
2018/11/08 10:37:22 pushed blob sha256:14bed8d531678cbe03fcc2c878a27783980098aa3899d794c26c143f079e5d0e
2018/11/08 10:37:22 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:8e8347c09f41b43860c8498c15a01a2ba2c92395cf1dab40196d3d8c46a9ef91: digest: sha256:f7bb0c4888d3292c2eb29f5e5cff773b3380d548211c17075dcab90ba94f4b7a size: 424
INFO[0068] RUN apt-get update                           
INFO[0068] cmd: /bin/sh                                 
INFO[0068] args: [-c apt-get update]                    
Get:2 http://deb.debian.org/debian testing InRelease [150 kB]
Get:1 http://cdn-fastly.deb.debian.org/debian sid InRelease [233 kB]
Get:3 http://deb.debian.org/debian testing/main amd64 Packages [10.3 MB]
Get:4 http://cdn-fastly.deb.debian.org/debian sid/main amd64 Packages [11.1 MB]
Fetched 21.8 MB in 2s (7,526 kB/s)
Reading package lists...
INFO[0072] Taking snapshot of full filesystem...        
INFO[0082] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9322825f6a1aa1194df0cf7dc56696b284745068829373e7676cfeec2a9ec2b9 to cache now 
2018/11/08 10:37:37 pushed blob sha256:0b67fdb3528d401cc218c69470298b965cbd1249258ab6e0ec90176287427a16
2018/11/08 10:37:43 pushed blob sha256:e3ee0c0b557fd68036b80600ac1fe1643259615b58d0a9384ec33debd6729a6a
2018/11/08 10:37:43 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9322825f6a1aa1194df0cf7dc56696b284745068829373e7676cfeec2a9ec2b9: digest: sha256:d9dce9df2a573f2455804b63cfc6412c5da06141e9d0438585f4c3d20c85c4cf size: 429
INFO[0089] RUN apt-get install libxml2-dev --yes        
INFO[0089] cmd: /bin/sh                                 
INFO[0089] args: [-c apt-get install libxml2-dev --yes] 
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libicu-le-hb0 libicu60 libxml2
The following NEW packages will be installed:
  libicu-le-hb0 libicu60 libxml2 libxml2-dev
0 upgraded, 4 newly installed, 0 to remove and 275 not upgraded.
Need to get 9,634 kB of archives.
After this operation, 37.5 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian testing/main amd64 libicu60 amd64 60.2-6 [8,073 kB]
Get:2 http://deb.debian.org/debian testing/main amd64 libicu-le-hb0 amd64 1.0.3+git161113-5 [14.6 kB]
Get:3 http://deb.debian.org/debian testing/main amd64 libxml2 amd64 2.9.4+dfsg1-7+b1 [725 kB]
Get:4 http://deb.debian.org/debian testing/main amd64 libxml2-dev amd64 2.9.4+dfsg1-7+b1 [821 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 9,634 kB in 1s (6,871 kB/s)
Selecting previously unselected package libicu60:amd64.
(Reading database ... 29272 files and directories currently installed.)
Preparing to unpack .../libicu60_60.2-6_amd64.deb ...
Unpacking libicu60:amd64 (60.2-6) ...
Selecting previously unselected package libicu-le-hb0:amd64.
Preparing to unpack .../libicu-le-hb0_1.0.3+git161113-5_amd64.deb ...
Unpacking libicu-le-hb0:amd64 (1.0.3+git161113-5) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../libxml2_2.9.4+dfsg1-7+b1_amd64.deb ...
Unpacking libxml2:amd64 (2.9.4+dfsg1-7+b1) ...
Selecting previously unselected package libxml2-dev:amd64.
Preparing to unpack .../libxml2-dev_2.9.4+dfsg1-7+b1_amd64.deb ...
Unpacking libxml2-dev:amd64 (2.9.4+dfsg1-7+b1) ...
Processing triggers for libc-bin (2.25-3) ...
Setting up libicu60:amd64 (60.2-6) ...
Setting up libicu-le-hb0:amd64 (1.0.3+git161113-5) ...
Setting up libxml2:amd64 (2.9.4+dfsg1-7+b1) ...
Setting up libxml2-dev:amd64 (2.9.4+dfsg1-7+b1) ...
Processing triggers for libc-bin (2.25-3) ...
INFO[0094] Taking snapshot of full filesystem...        
INFO[0105] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:6f7b4370460cc49c8983940f3558b5b2ff963d6b68d2c11155c47422f6931afb to cache now 
2018/11/08 10:37:59 pushed blob sha256:67b234abce0673dede8dd357bd816470084bdc8442f621f325cdcea246525d8d
2018/11/08 10:38:04 pushed blob sha256:af411ae886a5c68b99d4420f061e436fbe50e260030619a5916a765a9b7baeff
2018/11/08 10:38:04 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:6f7b4370460cc49c8983940f3558b5b2ff963d6b68d2c11155c47422f6931afb: digest: sha256:08776aaf1ed10d710d1bc510d9054853bb7f75772fc99172fb569839c6b9626c size: 429
INFO[0110] RUN apt-get install libssl-dev --yes         
INFO[0110] cmd: /bin/sh                                 
INFO[0110] args: [-c apt-get install libssl-dev --yes]  
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libssl1.1
Suggested packages:
  libssl-doc
The following NEW packages will be installed:
  libssl-dev
The following packages will be upgraded:
  libssl1.1
1 upgraded, 1 newly installed, 0 to remove and 274 not upgraded.
Need to get 3,312 kB of archives.
After this operation, 8,633 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian testing/main amd64 libssl1.1 amd64 1.1.1-2 [1,525 kB]
Get:2 http://deb.debian.org/debian testing/main amd64 libssl-dev amd64 1.1.1-2 [1,787 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 3,312 kB in 0s (8,628 kB/s)
(Reading database ... 29370 files and directories currently installed.)
Preparing to unpack .../libssl1.1_1.1.1-2_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1-2) over (1.1.0g-2) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_1.1.1-2_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1-2) ...
Processing triggers for libc-bin (2.25-3) ...
Setting up libssl1.1:amd64 (1.1.1-2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Setting up libssl-dev:amd64 (1.1.1-2) ...
Processing triggers for libc-bin (2.25-3) ...
INFO[0112] Taking snapshot of full filesystem...        
INFO[0122] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:ce44554c0b658ddf3d11d53bae3c341b777d075f006d20ce43f381c62fabd9a5 to cache now 
2018/11/08 10:38:17 pushed blob sha256:9e46f8a758e6dd284c99c6c238c792f4eed94a87e8e4387db59b6551140f3919
2018/11/08 10:38:19 pushed blob sha256:7f5e4019e0cfe154eaa1131e686eab8b4f50e210e04deed4c8d53a73af3507a0
2018/11/08 10:38:19 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:ce44554c0b658ddf3d11d53bae3c341b777d075f006d20ce43f381c62fabd9a5: digest: sha256:df1e3704fb253801ec1cdfcb78dba5db1ec9d7e07f2a223d8c4da75211b79375 size: 428
INFO[0125] Using files from context: [/workspace/packrat] 
INFO[0125] ADD packrat /srv/shiny-server/packrat        
INFO[0125] Taking snapshot of files...                  
INFO[0125] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:3d6d4077d93b75596af0a7e5894d54c5df30d2780aa344d85f85a58a3e13ff07 to cache now 
2018/11/08 10:38:20 pushed blob sha256:27360c620b426e1e366d45b6f9eeab29b51a95865e4f5c994ea42e16f7625089
2018/11/08 10:38:20 pushed blob sha256:096136207bf851aaa18dd2173e1ac63e961c23519d61aef2826a1688a7b68b6a
2018/11/08 10:38:20 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:3d6d4077d93b75596af0a7e5894d54c5df30d2780aa344d85f85a58a3e13ff07: digest: sha256:384ceb1ce37cbfc9bb42f75e7e2059a176da6bee86052da9535ca886f7bc4b24 size: 425
INFO[0126] RUN cd /srv/shiny-server && R -e "install.packages('packrat'); packrat::restore()" 
INFO[0126] cmd: /bin/sh                                 
INFO[0126] args: [-c cd /srv/shiny-server && R -e "install.packages('packrat'); packrat::restore()"] 

R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages('packrat'); packrat::restore()
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/packrat_0.4.9-3.tar.gz'
Content type 'application/x-gzip' length 126158 bytes (123 KB)
==================================================
downloaded 123 KB

* installing *source* package ‘packrat’ ...
** package ‘packrat’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (packrat)

The downloaded source packages are in
	‘/tmp/RtmpgUwXce/downloaded_packages’
Installing R6 (2.2.2) ... 
	OK (built source)
Installing Rcpp (0.12.16) ... 
	OK (built source)
Installing digest (0.6.15) ... 
	OK (built source)
Installing jsonlite (1.5) ... 
	OK (built source)
Installing mime (0.5) ... 
	OK (built source)
Installing packrat (0.4.9-1) ... 
	OK (built source)
Installing sourcetools (0.1.6) ... 
	OK (built source)
Installing xtable (1.8-2) ... 
	OK (built source)
Installing httpuv (1.3.5) ... 
	OK (built source)
Installing htmltools (0.3.6) ... 
	OK (built source)
Installing shiny (1.0.5) ... 
	OK (built source)
Warning message:
In packrat::restore() :
  The most recent snapshot was generated using R version 3.4.2
> 
> 
INFO[0217] Taking snapshot of full filesystem...        
INFO[0229] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:e79e396cc20d5dfdee87a8da08c1bca0ca1afeba572c012a85b7a2eb59b7392c to cache now 
2018/11/08 10:40:04 pushed blob sha256:17010745e637e5f44537ec629d2297ae31537f449e9575b9899760498254c14f
2018/11/08 10:40:10 pushed blob sha256:96248dcfdee4312876a7fcb49200d4458b1cab7f582d2e1692010752412b7ff3
2018/11/08 10:40:10 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:e79e396cc20d5dfdee87a8da08c1bca0ca1afeba572c012a85b7a2eb59b7392c: digest: sha256:f4fc5d7d466db82819382fe3c0b05c56e15eab999879f4371a56ca043c52f652 size: 429
INFO[0237] Using files from context: [/workspace]       
INFO[0238] ADD . /srv/shiny-server/                     
INFO[0239] Taking snapshot of files...                  
INFO[0279] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:04987e31e06a6d4c3a191156160dd3b64c5acaf1014c3c390294f461e6c410d8 to cache now 
2018/11/08 10:40:53 pushed blob sha256:ded3cd4fe5fdd7d181ee2ad855f7aebf2768084be7d8c042c4826422deedd54c
2018/11/08 10:42:14 pushed blob sha256:7f2461a289eb5a3f3fa765fe179849c0064c9578bdfa131faac69785e837cc70
2018/11/08 10:42:14 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:04987e31e06a6d4c3a191156160dd3b64c5acaf1014c3c390294f461e6c410d8: digest: sha256:d3337ad7222d870b6becba86602e4e46b1c4355f3b91f62b1a497714b29d9dd4 size: 430
INFO[0361] RUN chown -R shiny:shiny /srv/shiny-server   
INFO[0361] cmd: /bin/sh                                 
INFO[0361] args: [-c chown -R shiny:shiny /srv/shiny-server] 
INFO[0361] Taking snapshot of full filesystem...        
INFO[0461] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:18d6576d4026d591e6dbde58844f4ab1a28d44da58abc023ed9d67c47a4a72b2 to cache now 
2018/11/08 10:44:05 pushed blob sha256:0620105d483272f44e0d5d7c3ab48ffb49f27dffde0e068baa02885539bda853
2018/11/08 10:46:06 pushed blob sha256:9172e0cf57ab938a5a0d33f3de7cb69a7fd68e0b5e73291020bd1e535e55681a
2018/11/08 10:46:06 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:18d6576d4026d591e6dbde58844f4ab1a28d44da58abc023ed9d67c47a4a72b2: digest: sha256:5874cce08d4e8685839d08e41fc54e9b01ba66190821d692f3cca3a10de6f1a0 size: 430
INFO[0593] RUN apt-get clean && rm -rf /var/lib/apt/lists/ 
INFO[0593] cmd: /bin/sh                                 
INFO[0593] args: [-c apt-get clean && rm -rf /var/lib/apt/lists/] 
INFO[0594] Taking snapshot of full filesystem...        
INFO[0602] Adding whiteout for /var/lib/apt/lists       
^[[BINFO[1112] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9234b1121ccaa16249c56630303ec7f9b7aba48bedb4d16027455075f9a22a72 to cache now 
2018/11/08 10:54:47 pushed blob sha256:1f76b735af7a363e7c4a1024270bfd33e6b1fddc3d5cb8ba2c7328fa7985b45e
2018/11/08 10:54:48 pushed blob sha256:8df6ecebc4e4f2a323149b589eff98a530f783cf7ac0f25a5711a987b7b40f04
2018/11/08 10:54:49 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9234b1121ccaa16249c56630303ec7f9b7aba48bedb4d16027455075f9a22a72: digest: sha256:87660554cf30dad5da462981a22a30c5dc648c83867d070b13db11de342958d3 size: 425
INFO[1116] RUN sed -i 's/3838/80/g' /etc/shiny-server/shiny-server.conf 
INFO[1116] cmd: /bin/sh                                 
INFO[1116] args: [-c sed -i 's/3838/80/g' /etc/shiny-server/shiny-server.conf] 
INFO[1116] Taking snapshot of full filesystem...        
INFO[1507] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:23487c2902441c0aa0c718470e5fe8edf594999d858c265571832c78b750d9d5 to cache now 
2018/11/08 11:01:20 pushed blob sha256:a3471c3cf0f33d3aa791dea8283aa23cd6374fd7bbe275c315a48d26669bff09
2018/11/08 11:01:21 pushed blob sha256:1ced8768061c6c7b85f6736dc66b829021207bcd2d77a71c91f7604f7c08feab
2018/11/08 11:01:21 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:23487c2902441c0aa0c718470e5fe8edf594999d858c265571832c78b750d9d5: digest: sha256:a26155fc95883148b799341b9b8007f6d2c364788847af55641cbe58eeb07cd2 size: 425
INFO[1509] EXPOSE 80                                    
INFO[1509] cmd: EXPOSE                                  
INFO[1509] Adding exposed port: 80/tcp                  
2018/11/08 11:01:21 existing blob: sha256:4f84e00c7348f149af1ef748d8431d9754bd3245ec4d6ddf73adf2952c4e4be4
2018/11/08 11:01:21 existing blob: sha256:f691a4f4a24d963ffbf31f494bda798881da5f6f58a068e5ed8f922cf96d2ab7
2018/11/08 11:01:21 existing blob: sha256:c1f940e4549519fc6ebec3e07081fcb0a2b4e71ac9a22f5f0f8a48e14285b298
2018/11/08 11:01:21 existing blob: sha256:9e4bc36d3d3decc49c38f63180bbf327fb488fd26d34048e4cb6bef482fa8f04
2018/11/08 11:01:21 existing blob: sha256:b22628238f817c19ee68b341feacc7a3f6e7aa90bdafd49a10f32640b7113397
2018/11/08 11:01:21 existing blob: sha256:ac824468ffdeb0785ac8d12aa61f55e4be06d978e6f1b927a8750e439066f092
2018/11/08 11:01:21 existing blob: sha256:a54835bd88ab426470cae777f9003c0746ce26a0f6123350766350f65b6c0e5e
2018/11/08 11:01:21 existing blob: sha256:64805279ffc2b44d4229fc696c9514a14857d307f6a05d9d312226b1fbc7c8ea
2018/11/08 11:01:22 pushed blob sha256:9c8fcb8aab7faad170510782c985d7a2b99b995f4b8c773e16d5187b071d0d9c
2018/11/08 11:01:22 pushed blob sha256:096136207bf851aaa18dd2173e1ac63e961c23519d61aef2826a1688a7b68b6a
2018/11/08 11:01:22 pushed blob sha256:1f76b735af7a363e7c4a1024270bfd33e6b1fddc3d5cb8ba2c7328fa7985b45e
2018/11/08 11:01:22 pushed blob sha256:564ec00d93b5ff98f02d795a91f3b8ece43a2e39c616a75c5e7a24ea4bf6a682
2018/11/08 11:01:23 pushed blob sha256:1ced8768061c6c7b85f6736dc66b829021207bcd2d77a71c91f7604f7c08feab
2018/11/08 11:01:23 pushed blob sha256:14bed8d531678cbe03fcc2c878a27783980098aa3899d794c26c143f079e5d0e
2018/11/08 11:01:32 pushed blob sha256:7f5e4019e0cfe154eaa1131e686eab8b4f50e210e04deed4c8d53a73af3507a0
2018/11/08 11:01:36 pushed blob sha256:af411ae886a5c68b99d4420f061e436fbe50e260030619a5916a765a9b7baeff
2018/11/08 11:01:40 pushed blob sha256:96248dcfdee4312876a7fcb49200d4458b1cab7f582d2e1692010752412b7ff3
2018/11/08 11:01:41 pushed blob sha256:e3ee0c0b557fd68036b80600ac1fe1643259615b58d0a9384ec33debd6729a6a
2018/11/08 11:02:46 pushed blob sha256:7f2461a289eb5a3f3fa765fe179849c0064c9578bdfa131faac69785e837cc70
2018/11/08 11:03:02 pushed blob sha256:9172e0cf57ab938a5a0d33f3de7cb69a7fd68e0b5e73291020bd1e535e55681a
2018/11/08 11:03:02 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template:kaniko-test: digest: sha256:d45204277e0c6bcb3f0ce4cad71d89f9833ff1d899e29b1ffbe49cbaeb2a2044 size: 3366

real	26m51.187s
user	0m0.115s
sys	0m0.127s
Aldos-MacBook-Pro:kaniko aldogiambelluca$ time /tmp/run_in_docker.sh ./Dockerfile $(pwd) 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template:kaniko-test
WARN[0000] Error while retrieving image from cache: getting image from path: open /cache/sha256:627a2b7b3b6b1f6e33d37bdba835bbbd854acf70d74010645af71fc3ff6c32b6: no such file or directory 
INFO[0000] Downloading base image rocker/shiny@sha256:627a2b7b3b6b1f6e33d37bdba835bbbd854acf70d74010645af71fc3ff6c32b6 
2018/11/08 11:03:39 No matching credentials were found, falling back on anonymous
INFO[0001] Executing 0 build triggers                   
INFO[0001] Extracting layer 0                           
INFO[0005] Extracting layer 1                           
INFO[0005] Extracting layer 2                           
INFO[0008] Extracting layer 3                           
INFO[0009] Extracting layer 4                           
INFO[0009] Extracting layer 5                           
INFO[0032] Extracting layer 6                           
INFO[0045] Extracting layer 7                           
INFO[0045] Taking snapshot of full filesystem...        
INFO[0052] Checking for cached layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:a7a49f96a1c83fcef748b5c8393c6b81d4f80e8e525ba13fcdefae93dd4d44f2... 
INFO[0053] No cached layer found for cmd RUN rm -rf /srv/shiny-server/* 
INFO[0053] RUN rm -rf /srv/shiny-server/*               
INFO[0053] cmd: /bin/sh                                 
INFO[0053] args: [-c rm -rf /srv/shiny-server/*]        
INFO[0053] Taking snapshot of full filesystem...        
INFO[0054] Adding whiteout for /srv/shiny-server/08_html 
INFO[0054] Adding whiteout for /srv/shiny-server/09_upload 
INFO[0054] Adding whiteout for /srv/shiny-server/02_text 
INFO[0054] Adding whiteout for /srv/shiny-server/10_download 
INFO[0054] Adding whiteout for /srv/shiny-server/03_reactivity 
INFO[0054] Adding whiteout for /srv/shiny-server/05_sliders 
INFO[0054] Adding whiteout for /srv/shiny-server/07_widgets 
INFO[0054] Adding whiteout for /srv/shiny-server/04_mpg 
INFO[0054] Adding whiteout for /srv/shiny-server/index.html 
INFO[0054] Adding whiteout for /srv/shiny-server/11_timer 
INFO[0054] Adding whiteout for /srv/shiny-server/01_hello 
INFO[0054] Adding whiteout for /srv/shiny-server/sample-apps 
INFO[0054] Adding whiteout for /srv/shiny-server/06_tabsets 
INFO[0057] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9f164a5b1eb5d4db6877e0faa1ab25d5973488f6134ccb1fb41b76732f4a9468 to cache now 
2018/11/08 11:04:37 pushed blob sha256:d874af53978b5b7371471811c944e294e9cdd59d90e361b1c8a45adfecf6760d
2018/11/08 11:04:37 pushed blob sha256:8b3c608510d7a0e844e5d829021edee5f581c2fcc2af6649deb5d85ed421f6a3
2018/11/08 11:04:38 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9f164a5b1eb5d4db6877e0faa1ab25d5973488f6134ccb1fb41b76732f4a9468: digest: sha256:97a4e2c904fad78aa119adeb41ea4e51b3961b3008a16dc1ea26216e7373e292 size: 425
INFO[0058] RUN mkdir -p /var/log/shiny-server           
INFO[0058] cmd: /bin/sh                                 
INFO[0058] args: [-c mkdir -p /var/log/shiny-server]    
INFO[0058] Taking snapshot of full filesystem...        
INFO[0062] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:8e8347c09f41b43860c8498c15a01a2ba2c92395cf1dab40196d3d8c46a9ef91 to cache now 
2018/11/08 11:04:42 pushed blob sha256:afeb40b4573572b3c0c0a8478d187c647b6c69507c272b95a8e34d9ceea22fce
2018/11/08 11:04:43 pushed blob sha256:5f3182dc36895d3594448799d3654209f9b014ce281f298afa70c25b7c133f2a
2018/11/08 11:04:43 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:8e8347c09f41b43860c8498c15a01a2ba2c92395cf1dab40196d3d8c46a9ef91: digest: sha256:fc977d42d3411fe1565bd1e8ab327e1a0f1d23e883f512577179335390c03301 size: 424
INFO[0063] RUN apt-get update                           
INFO[0063] cmd: /bin/sh                                 
INFO[0063] args: [-c apt-get update]                    
Get:2 http://deb.debian.org/debian testing InRelease [150 kB]
Get:1 http://cdn-fastly.deb.debian.org/debian sid InRelease [233 kB]
Get:3 http://deb.debian.org/debian testing/main amd64 Packages [10.3 MB]
Get:4 http://cdn-fastly.deb.debian.org/debian sid/main amd64 Packages [11.1 MB]
Fetched 21.8 MB in 2s (8,193 kB/s)
Reading package lists...
INFO[0067] Taking snapshot of full filesystem...        
INFO[0073] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9322825f6a1aa1194df0cf7dc56696b284745068829373e7676cfeec2a9ec2b9 to cache now 
2018/11/08 11:04:54 pushed blob sha256:50bce450df4a0fa5f5bb8221c87ce92e49c1dc088d4c48ce9e6a577382b37910
2018/11/08 11:05:01 pushed blob sha256:41b0202f2410953836fdadc2f12e50a031598c65cc1d221e42ef3ab4e0880f92
2018/11/08 11:05:01 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:9322825f6a1aa1194df0cf7dc56696b284745068829373e7676cfeec2a9ec2b9: digest: sha256:1c30887febf3b8d48b71b15b21823a6d7b41fd6c01e66f9ac88003da7202d57e size: 429
INFO[0081] RUN apt-get install libxml2-dev --yes        
INFO[0081] cmd: /bin/sh                                 
INFO[0081] args: [-c apt-get install libxml2-dev --yes] 
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libicu-le-hb0 libicu60 libxml2
The following NEW packages will be installed:
  libicu-le-hb0 libicu60 libxml2 libxml2-dev
0 upgraded, 4 newly installed, 0 to remove and 275 not upgraded.
Need to get 9,634 kB of archives.
After this operation, 37.5 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian testing/main amd64 libicu60 amd64 60.2-6 [8,073 kB]
Get:2 http://deb.debian.org/debian testing/main amd64 libicu-le-hb0 amd64 1.0.3+git161113-5 [14.6 kB]
Get:3 http://deb.debian.org/debian testing/main amd64 libxml2 amd64 2.9.4+dfsg1-7+b1 [725 kB]
Get:4 http://deb.debian.org/debian testing/main amd64 libxml2-dev amd64 2.9.4+dfsg1-7+b1 [821 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 9,634 kB in 1s (7,589 kB/s)
Selecting previously unselected package libicu60:amd64.
(Reading database ... 29272 files and directories currently installed.)
Preparing to unpack .../libicu60_60.2-6_amd64.deb ...
Unpacking libicu60:amd64 (60.2-6) ...
Selecting previously unselected package libicu-le-hb0:amd64.
Preparing to unpack .../libicu-le-hb0_1.0.3+git161113-5_amd64.deb ...
Unpacking libicu-le-hb0:amd64 (1.0.3+git161113-5) ...
Selecting previously unselected package libxml2:amd64.
Preparing to unpack .../libxml2_2.9.4+dfsg1-7+b1_amd64.deb ...
Unpacking libxml2:amd64 (2.9.4+dfsg1-7+b1) ...
Selecting previously unselected package libxml2-dev:amd64.
Preparing to unpack .../libxml2-dev_2.9.4+dfsg1-7+b1_amd64.deb ...
Unpacking libxml2-dev:amd64 (2.9.4+dfsg1-7+b1) ...
Processing triggers for libc-bin (2.25-3) ...
Setting up libicu60:amd64 (60.2-6) ...
Setting up libicu-le-hb0:amd64 (1.0.3+git161113-5) ...
Setting up libxml2:amd64 (2.9.4+dfsg1-7+b1) ...
Setting up libxml2-dev:amd64 (2.9.4+dfsg1-7+b1) ...
Processing triggers for libc-bin (2.25-3) ...
INFO[0085] Taking snapshot of full filesystem...        
INFO[0092] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:6f7b4370460cc49c8983940f3558b5b2ff963d6b68d2c11155c47422f6931afb to cache now 
2018/11/08 11:05:12 pushed blob sha256:cb738b2c5a060bdcea29f353e6258fd7077d97abbe2185de72a031f6f07636ae
2018/11/08 11:05:17 pushed blob sha256:6d449bc26957dba80145d937b90de3a364a5186b831cdd35409e977fe79124fa
2018/11/08 11:05:17 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:6f7b4370460cc49c8983940f3558b5b2ff963d6b68d2c11155c47422f6931afb: digest: sha256:bee4488e54d5680b5a8c4cc98d9f5c64787cb0807ce752c6fa79e9fae4768d65 size: 429
INFO[0098] RUN apt-get install libssl-dev --yes         
INFO[0098] cmd: /bin/sh                                 
INFO[0098] args: [-c apt-get install libssl-dev --yes]  
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  libssl1.1
Suggested packages:
  libssl-doc
The following NEW packages will be installed:
  libssl-dev
The following packages will be upgraded:
  libssl1.1
1 upgraded, 1 newly installed, 0 to remove and 274 not upgraded.
Need to get 3,312 kB of archives.
After this operation, 8,633 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian testing/main amd64 libssl1.1 amd64 1.1.1-2 [1,525 kB]
Get:2 http://deb.debian.org/debian testing/main amd64 libssl-dev amd64 1.1.1-2 [1,787 kB]
debconf: delaying package configuration, since apt-utils is not installed
Fetched 3,312 kB in 0s (10.4 MB/s)
(Reading database ... 29370 files and directories currently installed.)
Preparing to unpack .../libssl1.1_1.1.1-2_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1-2) over (1.1.0g-2) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_1.1.1-2_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1-2) ...
Processing triggers for libc-bin (2.25-3) ...
Setting up libssl1.1:amd64 (1.1.1-2) ...
debconf: unable to initialize frontend: Dialog
debconf: (TERM is not set, so the dialog frontend is not usable.)
debconf: falling back to frontend: Readline
Setting up libssl-dev:amd64 (1.1.1-2) ...
Processing triggers for libc-bin (2.25-3) ...
INFO[0100] Taking snapshot of full filesystem...        
INFO[0107] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:ce44554c0b658ddf3d11d53bae3c341b777d075f006d20ce43f381c62fabd9a5 to cache now 
2018/11/08 11:05:27 pushed blob sha256:df41309d084737cecd9a15e7d50b2c40d9b9f2336bf93037fcedd130d7f14b22
2018/11/08 11:05:30 pushed blob sha256:3172f1f937cfbcf7651c4dbafb2fb3aaa51ce93b5c466b27df0fb476fb39c921
2018/11/08 11:05:30 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:ce44554c0b658ddf3d11d53bae3c341b777d075f006d20ce43f381c62fabd9a5: digest: sha256:552aaca19c72e37578eb0fb899719a33a74920effdd1e0ea5e66319d68be57d2 size: 428
INFO[0111] Using files from context: [/workspace/packrat] 
INFO[0111] ADD packrat /srv/shiny-server/packrat        
INFO[0111] Taking snapshot of files...                  
INFO[0111] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:3d6d4077d93b75596af0a7e5894d54c5df30d2780aa344d85f85a58a3e13ff07 to cache now 
2018/11/08 11:05:31 pushed blob sha256:5da50032050af49104def0b2496045008622d9d61310bb1c6bb29c34cc9dd2a5
2018/11/08 11:05:31 pushed blob sha256:efdcaf974ce9332fbf7590ef150a736098a6b6382a74b60c9fd416b718a0d557
2018/11/08 11:05:31 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:3d6d4077d93b75596af0a7e5894d54c5df30d2780aa344d85f85a58a3e13ff07: digest: sha256:73581507e944300337fe5400513c54c16890eaadcd339c1e053199845554929f size: 425
INFO[0112] RUN cd /srv/shiny-server && R -e "install.packages('packrat'); packrat::restore()" 
INFO[0112] cmd: /bin/sh                                 
INFO[0112] args: [-c cd /srv/shiny-server && R -e "install.packages('packrat'); packrat::restore()"] 

R version 3.4.3 (2017-11-30) -- "Kite-Eating Tree"
Copyright (C) 2017 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> install.packages('packrat'); packrat::restore()
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/packrat_0.4.9-3.tar.gz'
Content type 'application/x-gzip' length 126158 bytes (123 KB)
==================================================
downloaded 123 KB

* installing *source* package ‘packrat’ ...
** package ‘packrat’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (packrat)

The downloaded source packages are in
	‘/tmp/Rtmp3Os6DF/downloaded_packages’
Installing R6 (2.2.2) ... 
	OK (built source)
Installing Rcpp (0.12.16) ... 
	OK (built source)
Installing digest (0.6.15) ... 
	OK (built source)
Installing jsonlite (1.5) ... 
	OK (built source)
Installing mime (0.5) ... 
	OK (built source)
Installing packrat (0.4.9-1) ... 
	OK (built source)
Installing sourcetools (0.1.6) ... 
	OK (built source)
Installing xtable (1.8-2) ... 
	OK (built source)
Installing httpuv (1.3.5) ... 
	OK (built source)
Installing htmltools (0.3.6) ... 
	OK (built source)
Installing shiny (1.0.5) ... 
	OK (built source)
> 
> 
Warning message:
In packrat::restore() :
  The most recent snapshot was generated using R version 3.4.2
INFO[0197] Taking snapshot of full filesystem...        
INFO[0209] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:e79e396cc20d5dfdee87a8da08c1bca0ca1afeba572c012a85b7a2eb59b7392c to cache now 
2018/11/08 11:07:09 pushed blob sha256:f78a8a19473affe6ec0eac84a8343da32f5ec22be49dc85369ea66504b756f98
2018/11/08 11:07:15 pushed blob sha256:d51d56fd440741731a449067bbdf66442312299335f50ed00c8955115eea1c6b
2018/11/08 11:07:15 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:e79e396cc20d5dfdee87a8da08c1bca0ca1afeba572c012a85b7a2eb59b7392c: digest: sha256:ec7b235889fd5ac749a3c8c440a34f08ee8dabc776255b04b29164d38d9660f7 size: 429
INFO[0216] Using files from context: [/workspace]       
INFO[0217] ADD . /srv/shiny-server/                     
INFO[0218] Taking snapshot of files...                  
INFO[0223] Pushing layer 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:04987e31e06a6d4c3a191156160dd3b64c5acaf1014c3c390294f461e6c410d8 to cache now 
2018/11/08 11:07:23 pushed blob sha256:f605fad9e5bb8eb1978b7f00dd3909c897809db79a46a04c196835265d14f7a7
2018/11/08 11:08:33 pushed blob sha256:679a8ec37d1f18d040384d1bd1b350bac71a0dae2ba7d28927bf996d82158b6d
2018/11/08 11:08:33 0000000000.dkr.ecr.eu-west-1.amazonaws.com/rshiny-template/cache:04987e31e06a6d4c3a191156160dd3b64c5acaf1014c3c390294f461e6c410d8: digest: sha256:85dc357d41dbcb32efe7c5becfbf2d6f45a2087364d7202358654442bc866cf8 size: 430
INFO[0294] RUN chown -R shiny:shiny /srv/shiny-server   
INFO[0294] cmd: /bin/sh                                 
INFO[0294] args: [-c chown -R shiny:shiny /srv/shiny-server] 
INFO[0294] Taking snapshot of full filesystem...        

@dlorenc
Copy link
Collaborator

dlorenc commented Nov 8, 2018

I think this was a regression I introduced. I'm working on a fix and a new test case.

@ghost
Copy link

ghost commented Nov 16, 2019

I have the same cache problem. even the workdir in the bottom

@ricardosilva86
Copy link

@priyawadhwa do you know what are the tags that Kaniko caches in more recent versions? thx in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants