mendix / docker-mendix-buildpack

Build and Run Mendix in Docker
https://www.mendix.com
Apache License 2.0
87 stars 114 forks source link

issue by building image #99

Closed fuchs0329 closed 4 years ago

fuchs0329 commented 4 years ago

[fox@foxserver docker-mendix-buildpack]$ make build-image docker build \ --build-arg BUILD_PATH=build \ --build-arg CF_BUILDPACK=v4.9.4 \ -t mendix/mendix-buildpack:v3.0.2 . Sending build context to Docker daemon 37.37MB Step 1/27 : ARG ROOTFS_IMAGE=mendix/rootfs:bionic Step 2/27 : FROM ${ROOTFS_IMAGE} AS builder ---> a08e43a50568 Step 3/27 : ARG BUILD_PATH=project ---> Using cache ---> 526f7a01a84d Step 4/27 : ARG DD_API_KEY ---> Using cache ---> 545b1f12920d Step 5/27 : ARG CF_BUILDPACK=v4.9.4 ---> Using cache ---> c15a36e3a866 Step 6/27 : RUN mkdir -p /opt/mendix/buildpack /opt/mendix/build && echo "CF Buildpack version ${CF_BUILDPACK}" && curl -fsSL https://github.com/mendix/cf-mendix-buildpack/archive/${CF_BUILDPACK}.tar.gz | tar xz -C /opt/mendix/buildpack --strip-components 1 && chgrp -R 0 /opt/mendix && chmod -R g=u /opt/mendix ---> Running in 3a56f46b2936 CF Buildpack version v4.9.4 curl: (18) transfer closed with outstanding read data remaining

gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now The command '/bin/sh -c mkdir -p /opt/mendix/buildpack /opt/mendix/build && echo "CF Buildpack version ${CF_BUILDPACK}" && curl -fsSL https://github.com/mendix/cf-mendix-buildpack/archive/${CF_BUILDPACK}.tar.gz | tar xz -C /opt/mendix/buildpack --strip-components 1 && chgrp -R 0 /opt/mendix && chmod -R g=u /opt/mendix' returned a non-zero code: 2 make: *** [Makefile:12: build-image] Error 2

cstevandy commented 4 years ago

Hi fuchs0329, can you provide more information? Are you using windows with git bash? Is this the latest 3.0.2 tag? Have you done the make get-sample? Can you also try without make file just using your test app?

fuchs0329 commented 4 years ago

Hi fuchs0329, can you provide more information? Are you using windows with git bash? Is this the latest 3.0.2 tag? Have you done the make get-sample? Can you also try without make file just using your test app?

hi,

my enviroment is: CentOS8 on VM ware15 in window 10 enterprise OS VM ware network adapter configured as bridge (same network as host win10) then i open git bash in win 10, then connect to the CentOS8 via ssh. Docker (installed in centOS8 docker-compose also installed.

my action in CentOS 8was: step 1: git clone --branch 3.0.2 --config core.autocrlf=false https://github.com/mendix/docker-mendix-buildpack to download mendix buildpack to CentOS disk.
step 2: run "make get-sample" in build pack folder step 3: clean up "build" folder by running: rm -Rf ./build/* step 4: unzip my own project to "build" folder" by running: unzip /home/fox/Github/VM.mpk -d build/ step 5: run make build-image then i got the error.

i didn't try to use sample app before i report this issue but i just tried to use sample app, still not work.

Result below: [fox@foxserver docker-mendix-buildpack]$ make build-image docker build \ --build-arg BUILD_PATH=build \ --build-arg CF_BUILDPACK=v4.9.4 \ -t mendix/mendix-buildpack:v3.0.2 . Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? make: *** [Makefile:12: build-image] Error 1 [fox@foxserver docker-mendix-buildpack]$ systemctl start docker.service ==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ==== Authentication is required to start 'docker.service'. Authenticating as: Fox Zhu (fox) Password: ==== AUTHENTICATION COMPLETE ==== [fox@foxserver docker-mendix-buildpack]$ make build-image docker build \ --build-arg BUILD_PATH=build \ --build-arg CF_BUILDPACK=v4.9.4 \ -t mendix/mendix-buildpack:v3.0.2 . Sending build context to Docker daemon 17.81MB Step 1/27 : ARG ROOTFS_IMAGE=mendix/rootfs:bionic Step 2/27 : FROM ${ROOTFS_IMAGE} AS builder ---> a08e43a50568 Step 3/27 : ARG BUILD_PATH=project ---> Using cache ---> 526f7a01a84d Step 4/27 : ARG DD_API_KEY ---> Using cache ---> 545b1f12920d Step 5/27 : ARG CF_BUILDPACK=v4.9.4 ---> Using cache ---> c15a36e3a866 Step 6/27 : RUN mkdir -p /opt/mendix/buildpack /opt/mendix/build && echo "CF Buildpack version ${CF_BUILDPACK}" && curl -fsSL https://github.com/mendix/cf-mendix-buildpack/archive/${CF_BUILDPACK}.tar.gz | tar xz -C /opt/mendix/buildpack --strip-components 1 && chgrp -R 0 /opt/mendix && chmod -R g=u /opt/mendix ---> Running in 3f9d1cd173ed CF Buildpack version v4.9.4 curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

gzip: stdin: unexpected end of file tar: Unexpected EOF in archive tar: Unexpected EOF in archive tar: Error is not recoverable: exiting now The command '/bin/sh -c mkdir -p /opt/mendix/buildpack /opt/mendix/build && echo "CF Buildpack version ${CF_BUILDPACK}" && curl -fsSL https://github.com/mendix/cf-mendix-buildpack/archive/${CF_BUILDPACK}.tar.gz | tar xz -C /opt/mendix/buildpack --strip-components 1 && chgrp -R 0 /opt/mendix && chmod -R g=u /opt/mendix' returned a non-zero code: 2 make: *** [Makefile:12: build-image] Error 2

cstevandy commented 4 years ago

I think you have an issue when trying to download cf-buildpack in step 6, you got a timeout or connection lost.

RUN mkdir -p /opt/mendix/buildpack /opt/mendix/build && echo "CF Buildpack version ${CF_BUILDPACK}" && curl -fsSL https://github.com/mendix/cf-mendix-buildpack/archive/${CF_BUILDPACK}.tar.gz | tar xz -C /opt/mendix/buildpack --strip-components 1 && chgrp -R 0 /opt/mendix && chmod -R g=u /opt/mendix

curl: (18) transfer closed with outstanding read data remaining curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

fuchs0329 commented 4 years ago

I think you have an issue when trying to download cf-buildpack in step 6, you got a timeout or connection lost.

RUN mkdir -p /opt/mendix/buildpack /opt/mendix/build && echo "CF Buildpack version ${CF_BUILDPACK}" && curl -fsSL https://github.com/mendix/cf-mendix-buildpack/archive/${CF_BUILDPACK}.tar.gz | tar xz -C /opt/mendix/buildpack --strip-components 1 && chgrp -R 0 /opt/mendix && chmod -R g=u /opt/mendix

curl: (18) transfer closed with outstanding read data remaining curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104

hi cstevandy, ok, thanks a lot for your advise, i will try again when the connection get better! i close this issue firstly