init: nasp-jumpserver
This commit is contained in:
15
nasp-jumpserver/Dockerfile
Normal file
15
nasp-jumpserver/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM docker.io/alpine
|
||||
|
||||
RUN apk add --no-cache openssh git sudo tmux vim bash zsh curl wget coreutils util-linux tzdata \
|
||||
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
|
||||
|
||||
COPY sshd_config /etc/ssh/sshd_config
|
||||
|
||||
RUN cd /opt && git clone https://git.nasp.ob.ac.cn/NASP/registry \
|
||||
&& ./registry/scripts/jumpserver_deploy.sh \
|
||||
&& curl dotfiles.cn | bash -s - -l -u root \
|
||||
&& sed -i 's?root:x:0:0:root:/root:/bin/ash?root:x:0:0:root:/root:/bin/zsh?' /etc/passwd \
|
||||
&& sed -i 's?ssh:x:1000:1000:jumpserver user ssh:/home/ssh:/bin/ash?ssh:x:1000:1000:jumpserver user ssh:/home/ssh:/bin/bash?' /etc/passwd
|
||||
|
||||
EXPOSE 22
|
||||
ENTRYPOINT ["/etc/startup.sh"]
|
||||
Reference in New Issue
Block a user