docker-mendix-buildpack icon indicating copy to clipboard operation
docker-mendix-buildpack copied to clipboard

Docker run is getting failed

Open rushimandage91 opened this issue 5 years ago • 6 comments

I am using Windows machine where I am running docker. Docker Build is getting succeed , but issue while Docker Run command.

Docker Run Command: docker run -it -e ADMIN_PASSWORD=Password1! -e DATABASE_ENDPOINT=mysql://root:root@localhost:3306/a <imagename:tagname>

Error:

INFO: Started Mendix Cloud Foundry Buildpack v3.2.4 [commit:unknown_commit]
WARNING: CF_INSTANCE_INDEX environment variable not found. Assuming responsibility for scheduled events execution and database synchronization commands.
sed: can't read .local/m2ee.yaml: No such file or directory
Traceback (most recent call last):
  File "/opt/mendix/buildpack/start.py", line 1296, in <module>
    pre_process_m2ee_yaml()
  File "/opt/mendix/buildpack/start.py", line 152, in pre_process_m2ee_yaml
    ".local/m2ee.yaml",
  File "/usr/lib/python3.4/subprocess.py", line 561, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sed', '-i', 's|BUILD_PATH|/opt/mendix/build|g; s|RUNTIME_PORT|8081|; s|ADMIN_PORT|8082|; s|PYTHONPID|6|', '.local/m2ee.yaml']' returned non-zero exit status 2
ERROR: Failed to terminate all child processes
Traceback (most recent call last):
  File "/opt/mendix/buildpack/start.py", line 1108, in terminate_process
    os.killpg(this_process, signal.SIGTERM)
ProcessLookupError: [Errno 3] No such process

image

rushimandage91 avatar Jun 13 '19 09:06 rushimandage91

I have seen this behaviour with other customers on Windows. Something seems wrong with the way how Windows preserves the permissions on the files, workaround is to run the Docker build on Linux (e.g. in a VM).

MXClyde avatar Jun 13 '19 10:06 MXClyde

Tried with Linux as well, but no luck. Getting same error on linux as well. Are there any pre-requisites for running the docker image on linux machine ? @MXClyde , Are you able to run it on your environment ?

rushimandage91 avatar Jun 17 '19 05:06 rushimandage91

Nope, no prerequisites other than Docker. Yes, I have it running on 10+ environments. You might want to try a release prior to 2.0.0 as they run as root.

MXClyde avatar Jun 17 '19 07:06 MXClyde

I am getting the same error running on a Mac. Has anyone found a solution? Thanks.

ghost avatar Jun 21 '19 15:06 ghost

Hey did you find any solution . I'm also facing the same issue. Getting an error on Debian.

tejaswi33 avatar Oct 13 '21 12:10 tejaswi33

I am facing the same issue currently. Working with Windows 11

firomero avatar Jun 19 '24 10:06 firomero