synchronization
This commit is contained in:
19
Ubuntu/Dockerfile-user
Normal file
19
Ubuntu/Dockerfile-user
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/offends/ubuntu:base
|
||||
|
||||
LABEL maintainer="Offends <offends4@163.com>"
|
||||
|
||||
ENV USER=demo
|
||||
ENV USER_PASSWORD=123456
|
||||
|
||||
# 如果用户不存在,则创建用户
|
||||
RUN useradd -m -s /bin/bash $USER \
|
||||
&& echo "${USER}:${USER_PASSWORD}" | chpasswd \
|
||||
&& chown -R $USER:$USER /.file
|
||||
|
||||
USER $USER
|
||||
|
||||
ENV NVIDIA_VISIBLE_DEVICES=all
|
||||
|
||||
WORKDIR /home/$USER
|
||||
|
||||
VOLUME /home/$USER
|
Reference in New Issue
Block a user