📌  相关文章
📜  docker sudo 如何添加用户 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:38.243000             🧑  作者: Mango

代码示例2
FROM alpine:latest
RUN apk --no-cache update \
    && apk --no-cache add sudo
copy run.sh /usr/local/
RUN addgroup -S cassandra && adduser -S cassandra -G cassandra
RUN chown -R cassandra:cassandra /home/cassandra/
RUN echo 'cassandra  ALL=(ALL) /bin/su' >>  /etc/sudoers
USER cassandra
ENTRYPOINT [ "sh","/usr/local/run.sh"]