dockerfiles/nasp-jumpserver/Dockerfile

18 lines
772 B
Docker
Raw Normal View History

2023-05-04 14:17:03 +08:00
FROM docker.io/alpine
2023-05-04 15:28:52 +08:00
RUN apk add --no-cache openssh git sudo tmux vim bash zsh curl wget coreutils util-linux tzdata shadow iputils \
2023-05-04 14:17:03 +08:00
&& cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone
COPY sshd_config /etc/ssh/sshd_config
2023-05-04 15:28:52 +08:00
COPY ssh_config /etc/ssh/ssh_config
2023-05-04 14:21:17 +08:00
COPY startup.sh /etc/startup.sh
2023-05-04 14:17:03 +08:00
2024-04-16 00:33:19 +08:00
RUN cd /opt && git clone https://git.nasp.fit/NASP/registry \
2023-05-04 14:17:03 +08:00
&& ./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 \
2023-05-04 15:39:40 +08:00
&& 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
2023-05-04 14:17:03 +08:00
EXPOSE 22
ENTRYPOINT ["/etc/startup.sh"]