Unable to create a tarball: archive/tar: write too long

4/11/2018

I am attempting to run a docker-compose file using kompose up. I am on Mac OS High Sierra, running latest and greatest versions of everything (Docker CE 17.12.0, VirtualBox 5.2.8 and kompose 1.11.0).

My docker-compose file is:

version: '2'

services:
  es:
    build: ./elastic-search
    image: horcle/es
    ports:
     - "9200:9200"
     - "9300:9300"  
    volumes:
     - ./data:/elasticsearch/data
  tab:
    build: ./nlp-tab
    image: horcle/nlptab
    ports:
     - "8000:8000"
    volumes:
     - ./data:/app/data

When I run kompose up the first image gets successfully built and pushed to Docker.io. However, I get the following error on the second image: FATA Error while deploying application: k.Transform failed: Unable to build Docker image for service tab: Unable to create a tarball: archive/tar: write too long

I Googled this, and the issue appears to be with symlinks, which are nowhere in the directory I am using to build this image.

As a test, I did a docker build -t horcle/nlptab . followed by a successful push to Docker.io using docker push horcle/nlptab. Also, docker-compose up runs just fine, as well.

I'm not exactly sure why I cannot run a kompose up to do the same thing.

-- horcle_buzz
docker
docker-compose
kompose
kubernetes

2 Answers

4/16/2020

Did you find a solution for this already? if not, try running below command and find out if any symlinks exist. ls -laR . | grep -B 5 " -> "

This may help you find dependencies from node_modules like folders that may be using symlinks.

-- ravi kiran mahankali
Source: StackOverflow

7/6/2019

I had this problem with a Node.js project. Deleting the node_modules folder (rm -rf node_modules) fixed it for me.

-- Sobogun Ifeoluwa
Source: StackOverflow