fix(jump): set default shell

This commit is contained in:
Dict Xiong 2025-06-11 16:51:50 +08:00
parent 25bd8373ae
commit 2dffc735a4
2 changed files with 17 additions and 2 deletions

View File

@ -10,8 +10,8 @@ COPY startup.sh /etc/startup.sh
RUN cd /opt && git clone https://git.nasp.fit/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
&& sed -i 's?root:x:0:0:root:/root:/bin/sh?root:x:0:0:root:/root:/bin/zsh?' /etc/passwd \
&& sed -i 's?ssh:x:1000:1000:jumpserver user ssh:/home/ssh:/bin/sh?ssh:x:1000:1000:jumpserver user ssh:/home/ssh:/bin/bash?' /etc/passwd
EXPOSE 22
ENTRYPOINT ["/etc/startup.sh"]

View File

@ -11,3 +11,18 @@ To run:
```
docker run -itd --restart=always -p 36022:22 git.nasp.fit/nasp/nasp-jumpserver:latest
```
Or with docker-compose:
```
jumpserver:
ports:
- 36022:22
container_name: jumpserver
image: git.nasp.fit/nasp/nasp-jumpserver
tty: true
dns: 10.255.0.1
dns_search: ""
restart: unless-stopped
network_mode: bridge
```