WASdev / ci.docker.websphere-traditional

Dockerfiles for WebSphere Application Server traditional
Apache License 2.0
171 stars 192 forks source link

Stucked on build step 10/12 WAS developer version #69

Open celada opened 6 years ago

celada commented 6 years ago

Hi there,

I ran the build for initial and profile images using the command ./build

On step 10/12 it stop with this message:

Step 10/12 : RUN wget -q -O - $TAR_URL | tar xz ---> Running in dd88b8b7ca58 tar: opt/IBM/WebSphere/AppServer/java/8.0/bin: Directory renamed before its status could be extracted tar: opt/IBM/WebSphere/AppServer/java/8.0: Directory renamed before its status could be extracted tar: opt/IBM/WebSphere/AppServer/java: Directory renamed before its status could be extracted tar: Exiting with failure status due to previous errors The command '/bin/sh -c wget -q -O - $TAR_URL | tar xz' returned a non-zero code: 2

Any help to make it continue until the end?

I'm working on a Mac V10.12.6

Thanks.

ddefrancesco commented 6 years ago

same error here, plz any pointer...

Client: Version: 17.06.2-ce API version: 1.30 Go version: go1.8.3 Git commit: cec0b72 Built: Tue Sep 5 20:12:06 2017 OS/Arch: darwin/amd64

Server: Version: 17.06.2-ce API version: 1.30 (minimum version 1.12) Go version: go1.8.3 Git commit: cec0b72 Built: Tue Sep 5 19:59:19 2017 OS/Arch: linux/amd64 Experimental: true

mac os x 10.12.6 me too....

davidcurrie commented 6 years ago

Hmm - just worked for me. Also on 10.12.6 although a slightly newer version of Docker (17.09.0-ce). Googling suggests that this might be an overlayfs issue. Perhaps that is fixed in the newer version of Docker for Mac? Another suggestion appears to be to try swapping the use of tar for bsdtar.

celada commented 6 years ago

Hi @davidcurrie, thanks for your inputs,, I got Docker Version 17.09.0-ce-mac35 (19611) Channel: stable. I installed it last Friday (3 days ago),, it suppose is the newest one. I will look for other version. Besides I update the Dockerfile for install script to use bsdtar instead of tar and trow me this error:

Step 10/12 : RUN wget -q -O - $TAR_URL | bsdtar xz ---> Running in b24e7e434f8c /bin/sh: 1: bsdtar: not found The command '/bin/sh -c wget -q -O - $TAR_URL | bsdtar xz' returned a non-zero code: 127

I will try the approach of dockers version.

celada commented 6 years ago

Hi there,, I see that non-zero code: 2 is from tar command at the end of the command on Dockerfile. As far as I know this exit code 2 is fatal error and it could be caused with the file is not found.

I conclude this because I ran it again and the error change it.

Step 10/12 : RUN wget -q -O - $TAR_URL | tar xz ---> Running in 8dca562a776e

gzip: stdin: unexpected end of file tar: Child returned status 1 tar: Error is not recoverable: exiting now The command '/bin/sh -c wget -q -O - $TAR_URL | tar vxz' returned a non-zero code: 2

I think for some reason the files that is trying to get are not available in the repository. I colleague advice to get the files from the repository and then run the build. Due to there are not instructions about it, do you have any link where I can download them? The file name that I have to look for? And, where do I have to put the downloaded files?

The version I'm looking for is WAS 9.0.0.5.

Thanks in advance.

ddefrancesco commented 6 years ago

I tried to upgrade Docker...same problem. Looks like the tar command couldn't spot was-xxx.tar on the container filesystem, maybe because wget command didn't finish its job correctly...I'll check whether the file arrives effectively on the container, if so where is located and at that point I'll try to play with file permissions...any further ideas? TIA PS I'm looking to build a different version so this is not a possible cause of yhis error.

davidcurrie commented 6 years ago

@celada - you'd need to install bsdtar. I had thought it might be because I was building 9.0.0.4 but I'be just tried 9.0.0.5 and that works for me.

If you look at the build script you'll see that the first docker run should output a tar file in to the current directory. So, I have a tar file called was-9.0.0.5.tar.gz that's around 1.2GB in size. Check that this file exists. The second run then creates a container to serve up that file to the third container.

ddefrancesco commented 6 years ago

@celada @davidcurrie I managed to build the image making the dockerfile install bsdtar and using the bsdtar -xz -f - instead of tar xz command in the install dockerfile. HTH

celada commented 6 years ago

Hi @davidcurrie @ddefrancesco thanks for your inputs. It works with both advices: install bsdtar and update the bsdtar command. 👍

Here how it changed the Dockerfile:

RUN apt-get update && apt-get install -y openssl wget bsdtar

RUN wget -q -O - $TAR_URL | bsdtar -xz -f -

Appreciate your time and support for this :)

davidcurrie commented 6 years ago

Re-opening - if this fix worked for both you guys (and I don't know why it isn't broken for me) then we'll update the scripts with this...