Search code examples
dockerwindows-7boot2dockerubuntu-16.04gunzip

Can't Unzip Files in Docker VM (Boot2Docker) / Windows 7 / CRC Error


Moin moin,

I'm unable to unzip files like eclipse.tar.gz with e.g gunzip. Neither in DockerFiles with ADD url nore when I use wget on the File.

$ wget http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/neon/1a/eclipse-jee-neon-1a-linux-gtk.tar.gz&mirror_id=96 
$ gunzip eclipse-jee-neon-1a-linux-gtk.tar.gz

I always get a CRC error. When I unzip the File with Windows there is no CRC error. They have the same CRC and the same MD5sum. I already changed the baseimage (debian/ubuntu), I used tar/gunzip and it happens when I build the images and when I unzip it in the bash from the Image.

This is my current system
 Client:
 Version:      1.12.0
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   8eab29e
 Built:        Thu Jul 28 23:54:00 2016
 OS/Arch:      windows/amd64

Server:
 Version:      1.12.2
 API version:  1.24
 Go version:   go1.6.3
 Git commit:   bb80604
 Built:        Tue Oct 11 17:00:50 2016
 OS/Arch:      linux/amd64
Kernel Version: 4.4.24-boot2docker
Operating System: Boot2Docker 1.12.2 (TCL 7.2); HEAD : 9d8e41b - Tue Oct 11 23:40:08 UTC 2016

Solution

  • I think you are just not using the good url. Try with http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/neon/1a/eclipse-jee-neon-1a-linux-gtk.tar.gz

    I tested the url you provided in a linux terminal and gives bad things so.

    In fact, the url you provided is not a direct download link so I don't think add nor wget can acquire the files from it. It provide an html file instead so this is not something you can untar/unzip

    if the url is correctly provided, try this :

    FROM ubuntu
    
    RUN apt-get update && apt-get install -y wget tar
    
    WORKDIR /home/extract
    VOLUME /home/extract
    CMD wget -qO- http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/neon/1a/eclipse-jee-neon-1a-linux-gtk-x86_64.tar.gz | tar -xz
    

    Or check https://github.com/titouanfreville/Docker/tree/master/unziper.

    It worked well for me. If it's working well for you too, update your dockerfile ;)