-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
198 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
FROM python:3.12-slim | ||
|
||
# SSH | ||
RUN apt-get update && apt-get -y install openssh-server | ||
RUN mkdir -p /var/run/sshd | ||
|
||
# RUN echo StrictHostKeyChecking no >> /etc/ssh/ssh_config | ||
# RUN ssh-keygen -t rsa -b 4096 -f ssh_host_rsa_key | ||
RUN /usr/bin/ssh-keygen -A | ||
RUN mkdir -p /var/run/sshd | ||
RUN service ssh restart | ||
|
||
# change password root | ||
RUN useradd --create-home --shell /bin/bash shinylive | ||
RUN echo "shinylive:docker" | chpasswd | ||
USER shinylive | ||
WORKDIR /home/shinylive | ||
RUN mkdir /home/shinylive/shinyapps | ||
|
||
USER root | ||
EXPOSE 5000 | ||
EXPOSE 22 | ||
|
||
COPY entrypoint.sh . | ||
|
||
CMD bash ./entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
cat /etc/ssh/ssh_config | ||
|
||
# Start the first process | ||
echo "Starting SSH and python webserver..." | ||
# service ssh restart & | ||
/usr/sbin/sshd & | ||
|
||
# Start the second process | ||
# echo "Starting webserver..." | ||
python3 -m http.server --directory shinyapps 5000 | ||
|
||
# Wait for any process to exit | ||
wait -n | ||
|
||
# Exit with status of process that exited first | ||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters