小编Dem*_*hen的帖子

useradd 不在 amazonlinux 基础映像中

It seems that useradd is not in amazonlinux docker base image.

useradd will work when when my Dockerfile install openldap-devel, so RUN useradd my_user will work when I my image have the following:

FROM amazonlinux

RUN yum -y install python3 \
    gcc \
    python3-pip \
    python3-devel \
    openldap-devel
Run Code Online (Sandbox Code Playgroud)

When my image is just build from

FROM amazonlinux

RUN yum -y install python3 \
    gcc \
    python3-pip \
    python3-devel 
Run Code Online (Sandbox Code Playgroud)

The command RUN useradd my_user fails with the error message /bin/sh: useradd: …

docker amazon-linux-2

4
推荐指数
2
解决办法
3215
查看次数

标签 统计

amazon-linux-2 ×1

docker ×1