Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 829
horcle_buzz Avatar asked Apr 11 '18 19:04

horcle_buzz


2 Answers

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

like image 151
Sobogun Ifeoluwa Avatar answered Nov 17 '22 04:11

Sobogun Ifeoluwa


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.

like image 34
ravi kiran mahankali Avatar answered Nov 17 '22 06:11

ravi kiran mahankali