Skip to content

Commit f9788c7

Browse files
committed
feat: add remove ssh logic in start shell when runtime initial
1 parent eb86e15 commit f9788c7

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/bin/bash
2+
. bin/activate
23
python3 hello.py

OS/debian-ssh/12.6/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ RUN chmod +x /usr/start/startup.sh && \
66
apt-get update && \
77
apt-get install -y \
88
dumb-init \
9+
wget \
910
openssh-client \
1011
openssh-server && \
1112
apt-get clean && \

configs/name.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ svelte=SvelteKit
3434
ubuntu=ubuntu
3535
cpp=C++
3636
c=c
37+
quarkus=quarkus

configs/port.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,4 @@ svelte=5173
3434
ubuntu=8080
3535
cpp=8080
3636
c=8080
37+
quarkus=8080

script/startup.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
# Define the password file location
44
PASSWORD_FILE="/usr/start/user_password.txt"
55

6+
if [ ! -z "${RUNTIME_INITIAL}" ]; then
7+
if [ -d "/home/devbox/.ssh" ]; then
8+
cd /home/devbox/.ssh
9+
rm -rf ./*
10+
fi
11+
if [ -f "/usr/start/user_password.txt" ]; then
12+
rm /usr/start/user_password.txt
13+
fi
14+
fi
15+
616
# Check if the password file exists
717
if [ ! -f "${PASSWORD_FILE}" ]; then
818
# If the password file doesn't exist, check if USER_PASSWORD is already set

0 commit comments

Comments
 (0)