Restoring Cache: tar: invalid tar magic

docker
caching
cache
cci2-doc

#1

When restoring the cache, we got the error: tar: invalid tar magic
Error validating cache from S3: exit status 1

Found a cache from build 1147 at v3-maven-2bVI2gXN_fdNdYNn1vHxDIIWv0K6YRscMRvsYTF65Uk=
Size: 82 MB
Cached paths:
  * /root/.m2

Downloading cache archive...
Validating cache...
tar: invalid tar magic
Found a cache from build 1147 at v3-maven-2bVI2gXN_fdNdYNn1vHxDIIWv0K6YRscMRvsYTF65Uk=
Size: 82 MB
Cached paths:
  * /root/.m2

Downloading cache archive...
Validating cache...
tar: invalid tar magic
Found a cache from build 1147 at v3-maven-2bVI2gXN_fdNdYNn1vHxDIIWv0K6YRscMRvsYTF65Uk=
Size: 82 MB
Cached paths:
  * /root/.m2

Downloading cache archive...
Validating cache...
tar: invalid tar magic
Error validating cache from S3: exit status 1

This is because the docker image we are using is based on alpine.
The solution was to install tar inside it.

jobs:
  build:
    working_directory: ~/the_repo
    docker:
      - image: "quay.io/coreos/awscli"
    steps:
      - run:
          name: install git openssh-client tar
          command: apk update && apk add git openssh-client tar

Maybe a node in the documentation would be worth it. Meanwhile, I hope this helps.


#2

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.