Closed mircomarahrens closed 5 years ago
This is odd as the command is running in the Docker image, but try modifying line 19 of the DockerFile from
echo 'user:passw0rd' | chpasswd
to
echo 'user:passw0rd' | sudo chpasswd
This leads to
[...] Step 5/7 : RUN echo app:passw0rd | sudo chpasswd ---> Running in a8b9ed50a9a2 Removing intermediate container a8b9ed50a9a2 ---> 91014e41df40 Step 6/7 : RUN chmod a+x /data/startApp.sh ---> Running in 99f84729bb75 chmod: changing permissions of '/data/startApp.sh': Operation not permitted The command '/bin/sh -c chmod a+x /data/startApp.sh' returned a non-zero code: 1
I am thinking that the base linux image has been updated to be more locked down.
Try changing that line to
RUN sudo chmod a+x /data/startApp.sh
This was also my next guess:
[...] Step 5/7 : RUN echo app:passw0rd | sudo chpasswd ---> Using cache ---> 91014e41df40 Step 6/7 : RUN sudo chmod a+x /data/startApp.sh ---> Running in 31317010cbdf sudo: no tty present and no askpass program specified The command '/bin/sh -c sudo chmod a+x /data/startApp.sh' returned a non-zero code: 1
Switching to an older version by changing
FROM ibmcom/mq:latest
to
FROM ibmcom/mq:9.0.5.0
solved the issue. I am not sure if this will work for the followup tasks but for now its working.
Doing so is leading to
docker run -e LICENSE=accept -e MQ_QMGR_NAME=QM1 -e LOG_FORMAT=json -p 1414:1414 -p 9443:9443 mqbadge:latest
standard_init_linux.go:207: exec user process caused "no such file or directory"
in the next step. Here also the output of docker version
in my command prompt:
Client: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 04:13:06 2019
OS/Arch: linux/amd64
Experimental: false
I will try to adapt the ibmcom/mq by changing the base linux image.
I switched to version 9.1.1.0 and could build the image. Before building I had to run dos2unix startApp.sh
since I worked under the debian wsl. Starting the container then led to the expected result.
Using version 9.1.1.0 instead of the latest totally fixes all the issues relating to users missing in the container or rights to change permissions
From 9.1.5 the container does not use OS based users or groups. Instead a file based system is being used. This is so that when you roll-out the container into production you can switch to an LDAP based system.
The 9.1.5 container uses htpasswd, with the relevant file in /etc/mqm/
For development, if you are not going to create new users, then you can use the 9.1.5 container. If you want to create new users, then you can use 9.1.4 or earlier, or use htpasswd with bcrypt to create the users or wait until there is documentation on how to create news users in the container with htpasswd and bcrypt.
Running
docker build . -t mqbadge:latest
from the command prompt on Windows 10 EE leads to the outputAny workarounds?