Docker Image Creation

1
Hi,   I am facing an error in creating the docker image for Mendix. The error is : => ERROR [builder 6/6] RUN mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&    0.4s ------ > [builder 6/6] RUN mkdir -p /tmp/buildcache /tmp/cf-deps /var/mendix/build /var/mendix/build/.local &&    chmod +rx /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git /opt/mendix/buildpack/buildpack/stage.py &&    cd /opt/mendix/buildpack &&    ./compilation /opt/mendix/build /tmp/buildcache /tmp/cf-deps 0 &&    rm -fr /tmp/buildcache /tmp/javasdk /tmp/opt /tmp/downloads /opt/mendix/buildpack/compilation /opt/mendix/buildpack/git &&    ln -s /opt/mendix/.java /opt/mendix/build &&    chown -R 1001:0 /opt/mendix /var/mendix &&    chmod -R g=u /opt/mendix /var/mendix: #17 0.392 /usr/bin/env: ‘python3\r’: No such file or directory   Please give suggestions to solve this error.   Thanks and Regards, Harshraj Singh
asked
5 answers
1

Same Problem here, anyone a solution?

answered
1

I am getting same error while building image. Any suggestion on this?

answered
1

Hello All, 

 

I had this problem after generating the Mendix docker rootfs images (mendix-rootfs:app and mendix-rootfs:builder) on Windows and trying to build the mendix app image on linux.

 

The solution was to convert the line endings from Windows (\r\n) to Linux (\n) in the file ./scripts/startup.py from docker-mendix-buildpack

 

If you notice the error, the message says exactly this on the first line of the above mentioned file:

image.png

‘python3\r’: No such file or directory

 

You can use Notepad++ or VS Code to convert to Linux line endings.

 

Maybe a better solution is to configure your git to handle the line endings for you. On your windows machine:

git config --global core.autocrlf true

 

Details: https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings

 

 

answered
0

I too faced the same issue while building the image, I found the solution to it if you build using the master branch's dockerfile, clone this particular tag v5.0.3 which runs without any problem.

answered
0

Ensure to store the .MDA file stored in project folder and You have to unzip the .MDA deployment package file to solve this problem

answered