kompose: kompose build fails: unable to create tarball

kompose build fails: unable to create tarball

my kompose version

$ kompose version
0.7.0 (ee79612)

when doing local builds on repo https://github.com/pranavgore09/classico/tree/nodejs-service

✔ ~/git/classico [:9f03f9e|✚ 1] 
12:08 $ git branch 
* (HEAD detached at origin/nodejs-service)
  master

I have made changes to the docker-compose file to have my docker hub repo name, docker-compose file looks like this:

✔ ~/git/classico [:9f03f9e|✚ 1] 
12:03 $ cat docker-compose.yaml 
version: '2'
services:
  backend:
    image: docker.io/surajd/backend
    build:
      context: ./backend
  gateway:
    image: docker.io/surajd/pranav/gateway
    build:
      context: ./gateway
    ports:
      - "1111:1111"
  daily:
    image: docker.io/surajd/daily-backend
    build:
      context: ./daily-backend

running the kompose build command

✔ ~/git/classico [:9f03f9e|✚ 1] 
12:04 $ kompose up --provider openshift 
INFO Building image 'docker.io/surajd/backend' from directory 'backend' 
INFO Image 'docker.io/surajd/backend' from directory 'backend' built successfully 
INFO Pushing image 'surajd/backend:latest' to registry 'docker.io' 
INFO Multiple authentication credentials detected. Will try each configuration. 
INFO Attempting authentication credentials 'https://index.docker.io/v1/ 
INFO Successfully pushed image 'surajd/backend:latest' to registry 'docker.io' 
INFO Building image 'docker.io/surajd/daily-backend' from directory 'daily-backend' 
FATA Unable to build Docker container for service daily: Unable to create a tarball: archive/tar: write too long 

Since the build is big, so i cannot know what is happening in background whether it is stuck or going on.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 6
  • Comments: 25 (5 by maintainers)

Most upvoted comments

I was trying to do it in a nuxt project (javascript project) and got the same error

but after removing the node_modules and the .nuxt built directories, this worked like a charm

(on Mac OS X 10.11.6)

Hi guys I’m having the same issue as well. Here is my docker-compose.yml:

version: '2'

services:

    mongo:
        image: mongo:latest
        restart: always
        environment:
         - MONGO_INITDB_ROOT_USERNAME=user
         - MONGO_INITDB_ROOT_PASSWORD=password
        ports:
         - "27017:27017"

    notifier:
        restart: always
        build:
          context: ./Notifier
        image: staterecordsnotifications_notifier
        volumes:
          - ./Notifier:/opt/app
        ports:
          - "3001:3001"
        links:
          - mongo

and it returns INFO Build key detected. Attempting to build and push image ‘staterecordsnotifications_notifier’ INFO Building image ‘staterecordsnotifications_notifier’ from directory ‘Notifier’ FATA Error while deploying application: k.Transform failed: Unable to build Docker image for service notifier: Unable to create a tarball: archive/tar: write too long

You can run this to see if your directory has any symlinks:

ls -laR . | grep -B 5 " -> "

I too am having the same issue. I do not have any symlinks, either.

as @Oliboy50 has said… remove your node_modules and build dirs and the tar will build.

In my case I had to rm -rf node_modules && rm -rf dist

No symlinks in my project, but still getting the same error. Anyone find another solution? /remove-lifecycle rotten

I don’t even use node (i’m using django rest framework) and have the same error.

Had a similar issue and it was due to a .gitignore including .venv, but somehow the .venv still hanging out. Deleting it from the top level directory fixed it.