Base kasmweb ubuntu desktop,with sudo function.
248
Base on kasmweb ubuntu desktop,with sudo function.
The kasmweb offcial provide the solution to solve user cannot get the root account. https://kasmweb.com/docs/latest/how_to/running_as_root.html
#Dockerfile
#sudo as root role.
FROM kasmweb/core-ubuntu-focal:1.14.0
USER root
ENV HOME /home/kasm-default-profile
ENV STARTUPDIR /dockerstartup
ENV INST_SCRIPTS $STARTUPDIR/install
WORKDIR $HOME
######### Customize Container Here ###########
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update \
&& apt-get install -y sudo \
&& echo 'kasm-user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers \
&& rm -rf /var/lib/apt/list/*
######### End Customizations ###########
RUN chown 1000:0 $HOME
RUN $STARTUPDIR/set_user_permission.sh $HOME
ENV HOME /home/kasm-user
WORKDIR $HOME
RUN mkdir -p $HOME && chown -R 1000:0 $HOME
USER 1000
How to use the image.
#run
docker run --rm -it --shm-size=512m -p 1201:6901 \
--name kasmsudo -e VNC_PW=dddd kasmsudo:1.0
#浏览器访问
https://localhost:1201
#账号密码.密码是容器创建时设置的。
#该账号通过sudo命令可以使用管理员功能。
kasm_user
dddd
You can add sudo command before you command.just like.
sudo apt update
If you want to get a better smooth experience,that you can update the cpus and memory of you container.
docker update --cpus=2 <container_id>
docker update --memory=4g --memory-swap=4g <container_di>
Content type
Image
Digest
sha256:3732bf4b1…
Size
1 GB
Last updated
about 3 years ago
docker pull yingge2017/kasmsudo:1.0