ibmcom / mq docker映像向后兼容问题 [英] ibmcom/mq docker image backward compatibility issue

查看:125
本文介绍了ibmcom / mq docker映像向后兼容问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用docker image ibmcom / mq。
我的撰写文件为:

I was using docker image ibmcom/mq . My compose file was:

FROM ibmcom/mq
USER root
# create another client user
# default is app without password
RUN useradd user1 -G mqclient && \
echo user1:passwd | chpasswd

然后当我再次构建最新映像时,它突然停止工作。

Then suddenly it was stopped working when I build latest image again.

错误是:

useradd: group 'mqclient' does not exist
ERROR: Service 'mq' failed to build: The command '/bin/sh -c useradd user1 -G mqclient &&     echo user1:passwd | chpasswd' returned a non-zero code: 6

现在compose不适用于最新图像(9.1。 5.0-r1)版本,但适用于旧版本,例如9.1.4.0-r1

Now compose is not working with latest image(9.1.5.0-r1) version but works with old version e.g. 9.1.4.0-r1

有人可以建议替代方法

推荐答案

从9.1.5开始,该容器不使用基于OS的用户或组。这是为了符合云最佳实践。而是使用基于文件的系统。这样,当您将云中的容器推出生产环境时,可以切换到基于LDAP的系统。

From 9.1.5 the container does not use OS based users or groups. This is to conform to cloud best practices. Instead a file based system is being used. This is so that when you roll-out the container in a cloud into production you can switch to an LDAP based system.

9.1.5容器使用htpasswd, / etc / mqm /

The 9.1.5 container uses htpasswd, with the relevant file in /etc/mqm/

为了进行开发,如果您不打算创建新用户,则可以使用9.1.5容器。如果要创建新用户,则可以使用9.1.4或更早版本,或者将htpasswd与bcrypt一起使用来创建用户。

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.

这篇关于ibmcom / mq docker映像向后兼容问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆